If statements in cells

R

Ron

I would like to have an if statement in a cell, that if
the cell it is checking is a specific date (formated with
only month and day) cell F3 would return an OK. Example
of what I have right now is =if(C3="10/30","OK","Bad")
However this does not seem to be working for when the date
of c3 is set to 10/30 cell f3 still returns the false
condition. Any suggestions?
 
F

Frank Kabel

Hi Ron
you probably have entered the value in C3 as date and just changed the
format to 'MM/DD'. internally Excel still holds the date value. So you
may change your function to
=IF(C3=DATE(2004,10,30),"OK","Bad")
or
IF(AND(MONTH(C3)=10;DAY(C3)=30),"OK","Bad")

HTH
Frank
 
R

Roger Govier

Hi Ron

Whilst the cell may be formatted as month/day, the value held will be month/
day/year
Try
=if(C3="10/30/03","OK","Bad")
 
B

Bob Phillips

Hi Ron,

Try

=IF(C3 = Date(2004,10,30),"OK","Bad")

or

=IF(C3=DATEVALUE("30-Oct-2004"),"OK","Bad")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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