Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default simple IF statement

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default simple IF statement

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


"Gemz" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,480
Default simple IF statement

Hi

=IF(E3<--"03/03/07","this","that")
or
=IF(E3<DATE(2007,3,3),"this","that")

--
Regards
Roger Govier

"Gemz" wrote in message
...
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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default simple IF statement

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
doesnt 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.

"reklamo" wrote:

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


"Gemz" wrote:

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default simple IF statement

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

--
---
HTH

Bob


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



"Gemz" wrote in message
...
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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default simple IF statement

Brilliant thank!!



"Roger Govier" wrote:

Hi

=IF(E3<--"03/03/07","this","that")
or
=IF(E3<DATE(2007,3,3),"this","that")

--
Regards
Roger Govier

"Gemz" wrote in message
...
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with simple if statement Lou H[_2_] Excel Worksheet Functions 3 November 7th 08 05:40 PM
Simple IF statement Steve Douglas P2p, MCP Excel Worksheet Functions 4 September 10th 07 12:32 PM
Simple if statement? [email protected] Excel Programming 4 October 30th 06 11:45 PM
Simple If Statement digital21st Excel Worksheet Functions 2 August 2nd 06 03:57 PM
Simple IF statement Patti[_2_] Excel Programming 2 July 2nd 05 04:49 PM


All times are GMT +1. The time now is 11:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"