View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas[_3_] Bob Umlas[_3_] is offline
external usenet poster
 
Posts: 320
Default IF Statement in a macro:

Sub UpDown()
Range("O7:O" &
Range("O7").End(xlDown).Row).FormulaR1C1="=IF(rc4 rc6,""UP"",IF(rc4<rc6,""DOWN"",""""))"
End Sub

"Damil4real" wrote in message
...
IF Statement in a macro:

If value in D7 is greater than value in F7, then indicate "UP" in O7.
If value in D7 is less than value in F7, then indicate "DOWN" in O7.

If value in D8 is greater than value in F8, then indicate "UP" in O8.
If value in D8 is less than value in F8, then indicate "DOWN" in O8.

This should be done for each cell in column O starting from O7 going
down.

I'm trying to include this IF statement in a macro I already have.

Thanks for your help!