Using two different formats for one cell.

G

Guest

I am trying to display a cell in a certain format depending on what cell it
is equal to. For example, =IF(B7=TRUE,C6,E6). If the answer is C6 I want
the field to display Jan 22 2004, if it is equal to E6 I want the field to
display Jan 2004. The answer would appear in cell K6 for example.
 
J

JE McGimpsey

one way:

=IF(B7, TEXT(C6,"mmm dd yyyy"), TEXT(E6,"mmm yyyy"))

Note that the result will be text, not actual dates.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top