I need help creating the following statement:
IF(U2<>"",DATEDIF(U2,TODAY(),"D")
ELSE IF(Q2<>"",DATEDIF(Q2,TODAY(),"D")
ELSE IF(M2<>"",DATEDIF(M2,TODAY(),"D")
ELSE(DATEDIF(E2,TODAY(),"D")
END IF
Thank you!![]()
I think ...
=IF(U2<>"",DATEDIF(U2,TODAY(),"D"),IF(Q2<>"",DATEDIF(Q2,TODAY(),"D"),IF(M2<>"",DATEDIF(M2,TODAY(),"D "),(DATEDIF(E2,TODAY(),"D"))))
Regards
Alternate formula:
=IF(COUNT(E2,M2,Q2,U2)=0,"",DATEDIF(IF(U2<>"",U2,IF(Q2<>"",Q2,IF(M2<>"",M2,E2))),TODAY(),"D"))
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
You are the bomb!! I removed the extra space after one of the "D "s and it worked beautifully. Thanks so much.
=IF(U2<>"",DATEDIF(U2,TODAY(),"D"),IF(Q2<>"",DATEDIF(Q2,TODAY(),"D"),IF(M2<>"",DATEDIF(M2,TODAY(),"D "),(DATEDIF(E2,TODAY(),"D")))))
This works great, as well ... and allows for the event when all 4 cells are blank. Thanks so much!
You're welcome.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks