Hi. I have a macro that looks for 2 numbers and compare if they are the same.
It's failing and I'm not sure why. In order to test it I've added the following 2 message boxes:
MsgBox salesorder1 & "=" & salesorder2
MsgBox salesorder1 = salesorder2
And this is the result:
Why is it not identifying it as the same? both are assigned by a Range.Value method. salesorder2 is a number stored as text (aligned to the left, and requires a ' to vlookup it), and salesorder1 will usually have a ' at the front. I've tried both options with the same results.
Thank you
It's failing and I'm not sure why. In order to test it I've added the following 2 message boxes:
MsgBox salesorder1 & "=" & salesorder2
MsgBox salesorder1 = salesorder2
And this is the result:
Why is it not identifying it as the same? both are assigned by a Range.Value method. salesorder2 is a number stored as text (aligned to the left, and requires a ' to vlookup it), and salesorder1 will usually have a ' at the front. I've tried both options with the same results.
Thank you
Last edited: