If statements

I am having a problem with the IF statements and was hoping someone could help me out real fast because this is probably an easy fix.

I have a design table with parts ranging from 6" diameters to 96" diameters and have a macro that creates drawings for each configuration.  I am having a problem getting them to scale correctly though.  I have to change the scale accordingly otherwise the smaller instances will be way too small on the drawings.  The configurations are named by part number and the part number is a depiction of the size, so I was trying to use that to choose the scale, but I don't know how to use the If statements correctly I guess.  I tried doing this:

IF 170000 < Number <173020 Then

     Scale = 4

ElseIf 173021 < Number < 180000 Then

     Scale = 8

End If

Because of the wide range of sizes, I have done like 4 or 5 of those little blocks and it will only change the scale according to the first like 5 lines, then it basically ignroes the rest.  Anyone have any advice?

SolidworksApi macros