Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Functions - Difference b/w two dates

Here's what i'm trying to do:
I have a spreadsheet that has columns for "referral date", "intake
consultation date", "monitoring date", "group date" and "1:1 date". At the
end of my spreadsheet, i have a section that calculated the difference (in
days) between each of these dates. Each row will have "referral date" and
"intake consultation date". But for each row, there may be a date in either
just one, a combination of two, or all three of "monitoring date", "group
date" and "1:1 date".

The problem is that in situations where there is a "referral date" and
nothing in the "monitoring date" column, the formula is giving me a negative
number. I'm not sure why it would give me a number at all, let alone a
negative one. Does anyone know why it's doing this? Or how to fix it?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Functions - Difference b/w two dates

We'd need to see your formula but it sounds like you're subtracting a date
from an empty cell. An empty cell evaluates as 0 so:

A1 = empty cell
B1 = some date like 1/1/2009

=A1-B1 (formated as Genaerl) returns -39814

So, what you need to do is test the cell and make sure it contains a date to
subtract.

=IF(COUNT(A1:B1)=2,A1-B1,"")

That makes sure there are 2 dates in the cells. If there are 2 dates then
process A1-B1. If there aren't 2 dates in the cells return a blank "".

--
Biff
Microsoft Excel MVP


"Shannakinz" wrote in message
...
Here's what i'm trying to do:
I have a spreadsheet that has columns for "referral date", "intake
consultation date", "monitoring date", "group date" and "1:1 date". At the
end of my spreadsheet, i have a section that calculated the difference (in
days) between each of these dates. Each row will have "referral date" and
"intake consultation date". But for each row, there may be a date in
either
just one, a combination of two, or all three of "monitoring date", "group
date" and "1:1 date".

The problem is that in situations where there is a "referral date" and
nothing in the "monitoring date" column, the formula is giving me a
negative
number. I'm not sure why it would give me a number at all, let alone a
negative one. Does anyone know why it's doing this? Or how to fix it?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Functions - Difference b/w two dates

That is exactly what i needed, thank you so much!

"T. Valko" wrote:

We'd need to see your formula but it sounds like you're subtracting a date
from an empty cell. An empty cell evaluates as 0 so:

A1 = empty cell
B1 = some date like 1/1/2009

=A1-B1 (formated as Genaerl) returns -39814

So, what you need to do is test the cell and make sure it contains a date to
subtract.

=IF(COUNT(A1:B1)=2,A1-B1,"")

That makes sure there are 2 dates in the cells. If there are 2 dates then
process A1-B1. If there aren't 2 dates in the cells return a blank "".

--
Biff
Microsoft Excel MVP


"Shannakinz" wrote in message
...
Here's what i'm trying to do:
I have a spreadsheet that has columns for "referral date", "intake
consultation date", "monitoring date", "group date" and "1:1 date". At the
end of my spreadsheet, i have a section that calculated the difference (in
days) between each of these dates. Each row will have "referral date" and
"intake consultation date". But for each row, there may be a date in
either
just one, a combination of two, or all three of "monitoring date", "group
date" and "1:1 date".

The problem is that in situations where there is a "referral date" and
nothing in the "monitoring date" column, the formula is giving me a
negative
number. I'm not sure why it would give me a number at all, let alone a
negative one. Does anyone know why it's doing this? Or how to fix it?

Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Functions - Difference b/w two dates

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Shannakinz" wrote in message
...
That is exactly what i needed, thank you so much!

"T. Valko" wrote:

We'd need to see your formula but it sounds like you're subtracting a
date
from an empty cell. An empty cell evaluates as 0 so:

A1 = empty cell
B1 = some date like 1/1/2009

=A1-B1 (formated as Genaerl) returns -39814

So, what you need to do is test the cell and make sure it contains a date
to
subtract.

=IF(COUNT(A1:B1)=2,A1-B1,"")

That makes sure there are 2 dates in the cells. If there are 2 dates then
process A1-B1. If there aren't 2 dates in the cells return a blank "".

--
Biff
Microsoft Excel MVP


"Shannakinz" wrote in message
...
Here's what i'm trying to do:
I have a spreadsheet that has columns for "referral date", "intake
consultation date", "monitoring date", "group date" and "1:1 date". At
the
end of my spreadsheet, i have a section that calculated the difference
(in
days) between each of these dates. Each row will have "referral date"
and
"intake consultation date". But for each row, there may be a date in
either
just one, a combination of two, or all three of "monitoring date",
"group
date" and "1:1 date".

The problem is that in situations where there is a "referral date" and
nothing in the "monitoring date" column, the formula is giving me a
negative
number. I'm not sure why it would give me a number at all, let alone a
negative one. Does anyone know why it's doing this? Or how to fix it?

Thanks.






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
Difference between dates Hassan Excel Discussion (Misc queries) 3 July 23rd 08 07:24 PM
difference between two dates Arun Excel Discussion (Misc queries) 3 June 25th 08 10:49 AM
Difference of two dates Zafar Excel Worksheet Functions 3 July 26th 07 08:44 AM
difference between dates Ankur Excel Discussion (Misc queries) 2 August 6th 06 05:16 PM
difference between dates dcccgoose Excel Discussion (Misc queries) 3 May 15th 06 03:34 AM


All times are GMT +1. The time now is 03:24 PM.

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"