5

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 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.

3

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"))
0

=IFERROR(ARRAYFORMULA(IF(LEN(H3:H);
 DATEDIF(H3:H; TODAY(); "D"); )); )

9

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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