I just spent 2 hours figuring out why excel Visual Basic considers 100 not greater than 39. I realized it is due to the fact that 100 has 3 digits and 39 has only 2.
If I write it as
"039"
Then excel DOES consider 100 greater than 039.
The problem is: now it considers 20 SMALLER than 039!
The solution to this problem would be to add a ZERO in front of all my 2-digit data. As you can imagine, that would be a huge endeavor and perhaps not even possible.
I think this is the wierdest problem. I hope someone can help.
here's the part of the code that applies:
If ActiveCell.Value = "" And ActiveCell.Offset(0, 1).Value > "039" Then
ActiveCell.Offset(0, 4).Select
If I write it as
"039"
Then excel DOES consider 100 greater than 039.
The problem is: now it considers 20 SMALLER than 039!
The solution to this problem would be to add a ZERO in front of all my 2-digit data. As you can imagine, that would be a huge endeavor and perhaps not even possible.
I think this is the wierdest problem. I hope someone can help.
here's the part of the code that applies:
If ActiveCell.Value = "" And ActiveCell.Offset(0, 1).Value > "039" Then
ActiveCell.Offset(0, 4).Select