If statements in cells

  • Thread starter Thread starter Ron
  • Start date Start date
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?
 
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
 
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")
 
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)
 
Back
Top