328iXdrive
New Member
- Joined
- Sep 30, 2016
- Messages
- 3
Hey Folks,
Long time reader, first time poster. I'm trying to have my code enter a formula in T8 (and T9, T10, etc.) until there is no longer a value in cell in row 8. It is based off another format so I need it to start on cell T8 so it doesn't pick up the headers (hence me trying to activate T8 first). However when I try this code, I see the cells being activated and the cursor moving down, however it hasn't copied in my formula to any of the cells:
Sub LossFormula()
'
' LossFormula Macro
'
Range("T8").Select
Do Until IsEmpty(ActiveCell.Offset(, -14))
FormulaR1C1 = "=(RC[-2]/RC[-3])*RC[-1]"
ActiveCell.Offset(1, 0).Select
Loop
End Sub
I know that the formula is right because when I try just putting that in with no loop whatsoever, the correct formula does appear in cell T8, but when I add the loop functions, it hops down but nothing happens. Is there anyone who could please help and let me know what I'm doing wrong?
Thanks in advance!
Long time reader, first time poster. I'm trying to have my code enter a formula in T8 (and T9, T10, etc.) until there is no longer a value in cell in row 8. It is based off another format so I need it to start on cell T8 so it doesn't pick up the headers (hence me trying to activate T8 first). However when I try this code, I see the cells being activated and the cursor moving down, however it hasn't copied in my formula to any of the cells:
Sub LossFormula()
'
' LossFormula Macro
'
Range("T8").Select
Do Until IsEmpty(ActiveCell.Offset(, -14))
FormulaR1C1 = "=(RC[-2]/RC[-3])*RC[-1]"
ActiveCell.Offset(1, 0).Select
Loop
End Sub
I know that the formula is right because when I try just putting that in with no loop whatsoever, the correct formula does appear in cell T8, but when I add the loop functions, it hops down but nothing happens. Is there anyone who could please help and let me know what I'm doing wrong?
Thanks in advance!