Less than numbers issue please help

  • Thread starter Thread starter DKY
  • Start date Start date
D

DKY

I'm trying to do a conditional with some cells that are formatted like
so.

Range("B" & i & ":S" & i).NumberFormat = "0"

(so that they show up as whole numbers)

and I'm running the If like so

If Range("R" & i).Value < "0.5" Then
color the row

the problem is that its catching the 0.5's and stuff but for some
reason its not catching the 0.0833333 which in my math education is
less than 0.5 but for some reason its not registering as less than 0.5.
Does anyone know why?
 
try using the number 0.5 and not a string containing the characters 0 . 5

If Range("R" & i).Value < 0.5 Then
 

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