Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: =DAYS360(A1,B1) bonks if no date in or out 1

Status
Not open for further replies.

coolcarls

Technical User
Jan 19, 2002
182
0
0
US
I have a date in column (A1), a date out column (A2). Some date in cells are blank, some date out are blank. I need a formula that looks to see if the date in cell is blank then "", but if the date in has a date value and the date out does not, then it must =DAYS360(A1,TODAY()). But otherwise just =DAYS360(A1,A2). On top of that, I only want to know if items have been in for more than 5 days, I guess I could use the filter for that, but if it could just be part of the formla that would be better. Ha
Carl
 
The following formula returns TRUE if there are more than 5 days difference, otherwise it returns an empty string. It also returns an empty string if A1 is blank. If A2 is blank, then the formula uses TODAY() instead.
=IF(A1="","",IF(DAYS360(A1,IF(A2="",TODAY(),A2))>5,TRUE,""))

Brad
 
HA! Brilliant! It works like a charm. Is there a way to display how many days instead of TRUE? No biggy, but would be cool.
Thank you so much, I have been working for hours and hours trying to figure this out and you did it in a second!
THANKS
Carl
 
Carl,
You just need to put the DAYS360 bit in place of the TRUE:
=IF(A1="","",IF(DAYS360(A1,IF(A2="",TODAY(),A2))>5,DAYS360(A1,IF(A2="",TODAY(),A2)),""))
Brad
 
Yes Sir, that's it! I owe you a beer!
Thanks,
Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top