Thread: = positioning
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
snax500[_2_] snax500[_2_] is offline
external usenet poster
 
Posts: 29
Default = positioning

Why does it matter where you put the "=" in a macro (see line 3). I am range
valuing cells that contain the "If" formula. In the following code:

For Each cll In Range("v10:v44")
If Left(cll.Formula, 3) = "=IF" Then
cll.Value = cll
End If
Next

why does this range value my cells but this next code does not:

For Each cll In Range("v10:v44")
If Left(cll.Formula, 3) = "=IF" Then
cll = cll.Value
End If
Next

Why is cll.Value=cll not the same as cll=cll.Value

Thanks