All this takes is a custom number format for the cell.
First, format it with your desired date format (which I am sure it already is).
Then bring up the formatting functionality and choose Custom
at the bottom of the list of types of number formatting.
It will show (to the right of that list) the symbols making up the current date format. For instance, it could show this:
m/d/yy;@
which will show any positive number as a date.
These formats can have four formats set: "positive value;negative value;zero value;text value" and while there can be more to it than that depending upon how you get interesting with the four formats permitted, all you need to do is add a format for any zero values the cell ends up containing. So you are interested in leaving the first part alone, and adding the two middle sections. (The @
actually is the fourth setting: text.)
Notice I separated the sections as I named them with the ;
character. So the following will address all four sections and add the handling of zero values:
m/d/yy;;;@
Just that. The lack of any formatting characters between the 1st/2nd and the 2nd/3rd ;
characters means that negative values and zero values will both be formatted as blank cells. (This has the advantage of handling negative values, but it you want what Excel will do for those on its own instead, put something, the m/d/yy
(your own formatting, actually, but for this answer, that) perhaps, in between the 1st/2nd ;
characters.
And you'll now see a blank when the value is zero, which is what it is when you get that 1/0/1900
result.
=IF(C27="","",...)
where...
is each formula respectively= ""