Thread: Newbie IF
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jeff jeff is offline
external usenet poster
 
Posts: 44
Default Newbie IF

I know I'm new to VB but this seems pretty simple and I'm
stuck.
I hate to ask dumb questions here but I've been looking at
this for an hour! Maybe it's late in the evening...

If ("d237" = "d239") Then
Range("d241").Value = "1"
Else
Range("d241").Value = "2"
End If

I'm returning "2" but it shouldn't be. Currently d237 does
equal d239. The only thing I can think of that could be
causing a problem is d237 is a formula and d239 is a cell
reference to another sheet.