I had been trying out Define Name in Excel. I defined a name for a cell in which I would put a text or date value or I may leave it blank.
But when I use this defined name in another cell, the second cell shows a numeric value except when there is actual text in the first cell.
Value in first cell | Value in second cell <blank> | 0 Some text | Some text Date | Numeric representation of date
How do I define a name for a column such that the value in first cell (whatever that may be) is displayed exactly as it is in the second cell? Am I missing something here?
Upon suggestion of mcalex, I repeated the experiment with format applied (Text and Date as appropriate).
The results are closer to what I need, but still not good enough. For example, even though the format applied works for dates, the blank text is still shown as a
0. Short of resorting to a formula like (pseudocode)
if 0 then show blank else show text, what can be done to fix this?
Apply Text format on source cell (first cell) and the following Custom format on destination cells (second cell):
For dates, apply Date format on both source cell and destination cells. Please see the answer of mcalex for more details.