ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Then number format (https://www.excelbanter.com/excel-discussion-misc-queries/217354-if-then-number-format.html)

JRW6277

If Then number format
 
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

Bob Alhat

If Then number format
 
See resonse to your earlier post

"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




All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com