• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help in this formula ... calculating difference of dates

Hello Guys
i have a issue in calculating date

Like if in D5 write 2 then in D2 its shows 2
But if in D4 i write Date then in D2 calculate the difference of date. For example i attach the file
 

Attachments

  • Book1.xlsx
    9.5 KB · Views: 7
i mention this formula in D2 but its not working when i write date in D4

=IF(ISNUMBER(D5), D5, IF(ISDATE(D4), DATEDIF(TODAY(), D4, "D"), ""))
 
Please, reread #3 reply
... situation ... You ... challenges
Or
where do You have challenges with that file?
... name that/those cells?
 
Okay ...
I type 12/04/2024 in D4
>>> A7 is 12/04/2024
I type 3 in D5
>>> A7 is 12/04/2024
Noted:
# cell D5 is totally separate cell with any formulas.
# cell D3 - for some reason someone would like to use "0" (text) instead of 0 (zero)
... if You would like to use text there ... then format that cell as text

What kind of challenge do You have?
 
Thanks, I got the solutions with my R&D formula. And thanks for your help

=IF(ISNUMBER(D5), D5, IF(ISNUMBER(D4), TODAY()-D4, "0"))

but I had to delete D3 formula which was waste
 
Back
Top