#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 149
Default diference in dates

hello
i have the following dates:

A B
1 07/06/2008 08/06/2008
2 02/06/2008 07/06/2008
3 03/06/2008 03/06/2008

i want a formula which gives me a difference between the 2 dates :
+1 for the first
-5 for the second
0 for the third
please help

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default diference in dates

=B1-A1
format the cell to General
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"pierre" wrote in message
...
hello
i have the following dates:

A B
1 07/06/2008 08/06/2008
2 02/06/2008 07/06/2008
3 03/06/2008 03/06/2008

i want a formula which gives me a difference between the 2 dates :
+1 for the first
-5 for the second
0 for the third
please help



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default diference in dates

What's the logic? Why is the first one + and the second one -?
If you accidentally have the dates in the second line in the wrong order:

=IF(B1A1,B1-A1,-(A1-B1))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"pierre" wrote in message ...
| hello
| i have the following dates:
|
| A B
| 1 07/06/2008 08/06/2008
| 2 02/06/2008 07/06/2008
| 3 03/06/2008 03/06/2008
|
| i want a formula which gives me a difference between the 2 dates :
| +1 for the first
| -5 for the second
| 0 for the third
| please help
|


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default diference in dates

Bernard is right; if you don't format as date, you don't have to care about the sign yourself!

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| What's the logic? Why is the first one + and the second one -?
| If you accidentally have the dates in the second line in the wrong order:
|
| =IF(B1A1,B1-A1,-(A1-B1))
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "pierre" wrote in message ...
|| hello
|| i have the following dates:
||
|| A B
|| 1 07/06/2008 08/06/2008
|| 2 02/06/2008 07/06/2008
|| 3 03/06/2008 03/06/2008
||
|| i want a formula which gives me a difference between the 2 dates :
|| +1 for the first
|| -5 for the second
|| 0 for the third
|| please help
||
|
|


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default diference in dates

I think Pierre wants the number of months between the dates.

Fpormat as general:
=IF(A2=B2,"The dates are the same.",IF(B2A2,MONTH(B2-A2),"The first
date is later than the second."))

Cliff Edwards



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default diference in dates

<I think Pierre wants the number of months between the dates.

Could be. But the name suggests French, and then it would be days.


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"ward376" wrote in message ...
|I think Pierre wants the number of months between the dates.
|
| Fpormat as general:
| =IF(A2=B2,"The dates are the same.",IF(B2A2,MONTH(B2-A2),"The first
| date is later than the second."))
|
| Cliff Edwards
|


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default diference in dates

From Wikipedia:

Little endian forms, starting with the day
This sequence is common to the vast majority of the world's countries (see below for breakdown of countries by format).

a.. 16/11/2003, 16.11.2003, 16-11-2003 or 16-11-03
b.. 16th [of] November 2003 (The 'of' is included in speech, however it is considered bad practise to include it when written.)
c.. 16th November 2003
d.. 16 November 2003
e.. 16 Nov 2003

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| <I think Pierre wants the number of months between the dates.
|
| Could be. But the name suggests French, and then it would be days.
|
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "ward376" wrote in message ...
||I think Pierre wants the number of months between the dates.
||
|| Fpormat as general:
|| =IF(A2=B2,"The dates are the same.",IF(B2A2,MONTH(B2-A2),"The first
|| date is later than the second."))
||
|| Cliff Edwards
||
|
|


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 360
Default diference in dates

Yes, you're probably right. :(

Cliff Edwards
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
is there a formula to show the diference between numbers? Ollie Excel Discussion (Misc queries) 4 March 27th 08 03:13 PM
how to seen diference colour after before 30 days [email protected] Excel Worksheet Functions 3 November 7th 07 04:08 AM
How to calculate the diference of times in excel? jaberli Excel Worksheet Functions 4 January 17th 07 09:14 PM
Accentuate diference between two values mihai Charts and Charting in Excel 3 August 18th 05 04:26 PM
Charting data against dates where dates are not at fixed intervals PK Charts and Charting in Excel 4 June 16th 05 05:08 AM


All times are GMT +1. The time now is 01:58 AM.

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

About Us

"It's about Microsoft Excel"