View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Harlan Grove[_5_] Harlan Grove[_5_] is offline
external usenet poster
 
Posts: 97
Default What's Wrong with This?

"D" wrote...
Sorry for the multi-post, but didn't know which group this belongs to...


Your terminology is incorrect. You crossposted, which is OK.

I have 2 columns for dates. Sometimes only one of the two has an entry in
it. Sometimes they both do. Although, they're NEVER both blank. I am trying
to create a function that will compare the 2 dates (if there's even 2
there), and find out which one is the earliest of the two. If one date is
missing from one column, it will just use the other date as the entry. Once
it finds the earliest date between them, I want it to count how many days
from the earliest date till today's date. I thought I did this right, but,
the results are returning a #VALUE! answer. Can someone see what's going on
here and tell me how to make this work?
Thanks!

=IF(L2="", DAYS360(V2,TODAY())), IF(V2="", DAYS360(L2,TODAY())), IF(L2<V2,
DAYS360(L2,TODAY())), IF(L2V2, DAYS360(V2,TODAY())), IF(L2=V2,
DAYS360(L2,TODAY()))


Do you really need DAYS360?

If not, and if L2 or V2 could be after today's date, then

=ABS(TODAY()-MIN(L2,V2))

If you need DAYS360,

=IF(TODAY()<MIN(L2,V2),DAYS360(TODAY(),MIN(L2,V2)) ,DAYS360(MIN(L2,V2),TODAY()))

--
To top-post is human, to bottom-post and snip is sublime.