Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following If/Then statement in a macro, the problem is when the
value of the K9 is less than 10 it isn't identified correctly by the if statement. Is there some easy fix like changing the number format I'm missing? If Range("K9") < "37.5" Then Call Message Else Call Macro1 End If |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Your macro is testing for text. To test for a number you need:
If Range("K9") < 37.5 Then HTH Bob "JRW6277" wrote in message ... I have the following If/Then statement in a macro, the problem is when the value of the K9 is less than 10 it isn't identified correctly by the if statement. Is there some easy fix like changing the number format I'm missing? If Range("K9") < "37.5" Then Call Message Else Call Macro1 End If |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I knew is was something silly like that. Thanks Bob
"Bob Alhat" wrote: Your macro is testing for text. To test for a number you need: If Range("K9") < 37.5 Then HTH Bob "JRW6277" wrote in message ... I have the following If/Then statement in a macro, the problem is when the value of the K9 is less than 10 it isn't identified correctly by the if statement. Is there some easy fix like changing the number format I'm missing? If Range("K9") < "37.5" Then Call Message Else Call Macro1 End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I'm sure it must be easy | Excel Discussion (Misc queries) | |||
Easy one... | Excel Worksheet Functions | |||
Is there an easy way to... | Excel Discussion (Misc queries) | |||
Easy one | Excel Worksheet Functions | |||
new user with easy question? not easy for me | New Users to Excel |