Hi - I have the following code;
Dim lastRow As Long
lastRow = Cells(Rows.Count, "D").End(xlUp).Row
Range("X2:X" & lastRow).FormulaR1C1 = "=SUM(RC[-3]:RC[-1])"
Is there a way to amend or add to this code so that the SUM formula starts in row 2 of column X and continues down, but stops as soon as the data in column A reads 'Duplicate'
Thanks
Dim lastRow As Long
lastRow = Cells(Rows.Count, "D").End(xlUp).Row
Range("X2:X" & lastRow).FormulaR1C1 = "=SUM(RC[-3]:RC[-1])"
Is there a way to amend or add to this code so that the SUM formula starts in row 2 of column X and continues down, but stops as soon as the data in column A reads 'Duplicate'
Thanks