If/Then - EASY

  • Thread starter Thread starter JRW6277
  • Start date Start date
J

JRW6277

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
 
Your macro is testing for text. To test for a number you need:

If Range("K9") < 37.5 Then


HTH
Bob
 

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