montecarlo2012
Well-known Member
- Joined
- Jan 26, 2011
- Messages
- 984
- Office Version
- 2010
- Platform
- Windows
Hi.
When I record a macro for the formula IF
IF(B2 > B3, true, false)
of course work
but reading about the Cells method
supposedly B3 and cells(3, 2) are the same thing
so when I substitute then do not work
Please, tell me what I am missing.
why I want to do this way.
because I would like to use a for next loop
so I will insert variables.
Thank you for reading this
When I record a macro for the formula IF
IF(B2 > B3, true, false)
of course work
but reading about the Cells method
supposedly B3 and cells(3, 2) are the same thing
so when I substitute then do not work
VBA Code:
Sub Macro1()
Cells(5, 3).Formula = "=IF(cells(1, 2) >cells(2, 2),YES, NO)"
End Sub
Please, tell me what I am missing.
why I want to do this way.
because I would like to use a for next loop
so I will insert variables.
Thank you for reading this