How to display date?

G

Guest

Does anyone have any suggestions on how to display date?

=If(True,23-Aug-07,"")
which is wrong statement in excel.
Does anyone have any suggestions on how to fix it?
Thanks in advance for any suggestions
Eric
 
G

Guest

Hi Eric,

Not sure that I really understand what you want but the following formula
tests the date in cell A1 and if it equals 23-Aug-07 the it inserts Yes else
it inserts No

=IF(A1=VALUE("23 Aug 2007"),"Yes","No")

Note: Because the VALUE function is converting an excel recognizable string
to a date then the format of the date in A1 does not have to match the format
of the date in the VALUE function.

Alternative Example where A1 is 23 Aug 2007 and value function using
different format. It still works:-

=IF(A1=VALUE("23/8/07"),"Yes","No")

Regards,

OssieMac
 
D

David Biddulph

As you will have seen, in your formula Excel will treat your "date" as 23
minus Aug minus 7 (and object with a #NAME error unless Aug is a defined
name). If you wanted Excel to recognise the date, you could use a modified
version of the formula
=IF(TRUE,--"23-Aug-07","")
but of course it is a fairly pointless IF statement, as TRUE is always true
so the condition is always met.
 
G

Guest

Take date in double quotes ("23-Sep-07") and format cell to date.
let us know if it works.
 

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