I'm attempting to create a formula that essentially counts the days between today's date and the date entered in a cell. So far I believe it works. See below:

=DATEDIF(H3, Today(), "D")

My dates are entered into column H and the formula is in column I.

My issue is if no date is entered it results with "43201". I would like it to stay blank or I'd settle with a dash or something. Right now I applied a conditional formatting to turn the cell black if it contains 43201..not an ideal solution.

I've looked and tried a few formulas but none seem to work with Google Sheets.

The formula

=IF(ISBLANK(H3), "", DATEDIF(H3, Today(), "D"))

puts the empty string if H3 is blank. This is probably enough for your purpose.

Technically, the real blank output would be achieved with

=IF(ISBLANK(H3), , DATEDIF(H3, Today(), "D"))

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.