#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Simple Formula

Hi,
I am trying to get : how many days between two columns: A contains dates,
column B contains also dates to get results on column C for example :
A B C
04.05.2008 06.07.2008 ? (how many days)

many thanks,
M.Barada
UAE
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Simple Formula

Assuming real dates in A1 & B1,
where B1's date (enddate) is later than A1's startdate
then in C1: =IF(COUNT(A1:B1)=2,B1-A1,"")
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,000 Files:354 Subscribers:53
xdemechanik
---
" wrote:
I am trying to get : how many days between two columns: A contains dates,
column B contains also dates to get results on column C for example :
A B C
04.05.2008 06.07.2008 ? (how many days)

many thanks,
M.Barada
UAE

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 169
Default Simple Formula

=DATE(RIGHT(C21,4),LEFT(C21,2),MID(C21,4,2))-DATE(RIGHT(B21,4),LEFT(B21,2),MID(B21,4,2))

Where C21 is your end date
B21 is your start date and I assumed your date format was month.day.year,
which may not be a good assumption.
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


" wrote:

Hi,
I am trying to get : how many days between two columns: A contains dates,
column B contains also dates to get results on column C for example :
A B C
04.05.2008 06.07.2008 ? (how many days)

many thanks,
M.Barada
UAE

  #4   Report Post  
Posted to microsoft.public.excel.misc
KMc KMc is offline
external usenet poster
 
Posts: 10
Default Simple Formula

Excuse me, but why can't you simply use the formula: =SUM(B1-a1)
as long as columns A & B are formatted as dates, and C as a number?

It always works for me.

k

"M Kan" wrote:

=DATE(RIGHT(C21,4),LEFT(C21,2),MID(C21,4,2))-DATE(RIGHT(B21,4),LEFT(B21,2),MID(B21,4,2))

Where C21 is your end date
B21 is your start date and I assumed your date format was month.day.year,
which may not be a good assumption.
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


" wrote:

Hi,
I am trying to get : how many days between two columns: A contains dates,
column B contains also dates to get results on column C for example :
A B C
04.05.2008 06.07.2008 ? (how many days)

many thanks,
M.Barada
UAE

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Simple Formula

Remember to format C1 as general or number
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,000 Files:354 Subscribers:53
xdemechanik
---



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 169
Default Simple Formula

I ended up with a #VALUE error (2003)
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"KMC" wrote:

Excuse me, but why can't you simply use the formula: =SUM(B1-a1)
as long as columns A & B are formatted as dates, and C as a number?

It always works for me.

k

"M Kan" wrote:

=DATE(RIGHT(C21,4),LEFT(C21,2),MID(C21,4,2))-DATE(RIGHT(B21,4),LEFT(B21,2),MID(B21,4,2))

Where C21 is your end date
B21 is your start date and I assumed your date format was month.day.year,
which may not be a good assumption.
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


" wrote:

Hi,
I am trying to get : how many days between two columns: A contains dates,
column B contains also dates to get results on column C for example :
A B C
04.05.2008 06.07.2008 ? (how many days)

many thanks,
M.Barada
UAE

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Simple Formula

With
A B C
04.05.2008 06.07.2008 ? (how many days)


as your data the the *dates* will in fact be text not real dates. This will
gave you the #VALUE! error that you are reporting.

Try entering the data like:

A B C
04/05/2008 06/07/2008

then use the formula in C1:

=B1-A1

and then format C1 as General or Number.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"M Kan" <tipsoftheweek at gmail dot com wrote in message
...
I ended up with a #VALUE error (2003)
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"KMC" wrote:

Excuse me, but why can't you simply use the formula: =SUM(B1-a1)
as long as columns A & B are formatted as dates, and C as a number?

It always works for me.

k

"M Kan" wrote:

=DATE(RIGHT(C21,4),LEFT(C21,2),MID(C21,4,2))-DATE(RIGHT(B21,4),LEFT(B21,2),MID(B21,4,2))

Where C21 is your end date
B21 is your start date and I assumed your date format was
month.day.year,
which may not be a good assumption.
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


" wrote:

Hi,
I am trying to get : how many days between two columns: A contains
dates,
column B contains also dates to get results on column C for example :
A B C
04.05.2008 06.07.2008 ? (how many days)

many thanks,
M.Barada
UAE




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 04:36 PM
Simple problem, simple formula, no FUNCTION ! Ron@Buy Excel Worksheet Functions 6 September 28th 07 05:51 PM
Need a simple formula Randy Bratton Excel Worksheet Functions 6 May 18th 07 06:46 PM
HELP WITH A SIMPLE FORMULA [email protected] Excel Discussion (Misc queries) 1 March 16th 07 11:16 PM
simple formula Brian Excel Worksheet Functions 7 June 17th 05 05:45 PM


All times are GMT +1. The time now is 06:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"