simple IF statement

  • Thread starter Thread starter Gemz
  • Start date Start date
G

Gemz

Hi,

Please can you help on an IF statement.

I just need to know how i can say in an IF statement if cell E3 is <
03/03/07 then if true 'this' and not true 'that'. I have tried it like this
but although it works it gives me inaccurate results, i think its not
recognising the date properly.

All i want to say is if the dates in column E are less than 03/03/07 (i.e.
dates before this period then etc etc).

How can i state this in my IF statement?

thanks.
 
Hi Gemz

Try following

Sub checkdate()
If DateValue(Cells(3, 5).Value) < "03/03/07" Then
MsgBox ("yes")
Else
MsgBox ("No")
End If
End Sub

regards
reklamo
 
Hi

=IF(E3<--"03/03/07","this","that")
or
=IF(E3<DATE(2007,3,3),"this","that")
 
Hi, this has worked but its not what I want. Basically if the person has a
date before this date then the column will say a certain thing, this is how
the user will monitor the students progress. Simply having a message box
doesn’t show me who has a date older than the date specified and it means it
would have to be clicked many times to get through the list of names to see
who is yes and who is no . can i not have this as an IF statement that i can
write in the spreadsheet?

Mine looks like this at the mo, it works but not correctly.

=IF(E4<30/3/2007,"POOR PROGRESS","GOOD PROGRESS")

thanks.
 
=IF(E3<DATE(2007,3,3),...

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Back
Top