View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
shelfish shelfish is offline
external usenet poster
 
Posts: 39
Default Failed Comparison... why?

On Dec 4, 7:45 pm, JLGWhiz wrote:
I misread your explanation and use A1 for the macro comparison. Should be:

Sub ckType()
MsgBox ActiveSheet.Range("B1").Value & " " & _
Sheets("Sheet2").Range("A1").Value 'all one line
End Sub


Right. I got what you meant. Msgbox had both values with no additional
marks on either. So I assume that means they are both viewed as
numbers. I also plugged in the trim function as you mentioned and it
returned true ("OK").

But again, in the cell directly below that, I entered =IF(B2='sheet 2'!
A2,"OK","OS") and got false ("OS").

Wow.