Trying to get a vba code that determines the last row used in column A then inserting the following formulas in the stated columns until the last row.
Range("AC2:AC" & lastrow).FormulaR1C1 = "=IF($S2="""",""Discard"",$T2-8)"
Range("AD2:AD" & lastrow).FormulaR1C1 = "=IF($S2="""",""Discard"",($S2*1000000000000)/($AC2*10000000))"
Hoping to do this without referencing the worksheet name. Thanks for any help!
Edit: What I am trying to figure out is the last row used in Column A. Then have the above formulas inserted in columns AC and AD from row 2 to the determined last row. I hope this clarifies what I am asking.