I need a code for these orders:
- Go to first blanks cell in column C.
- Calculat the number in column D minus 14 and do it as long there is a number right to the cell in D (there is blanks in column D)
- Copy the result in column C and paste it as values to Column B. note: I need it to stay in original rows.
` OP_wb.Sheets("Optic Main").Activate Dim FirstRow As Range Dim LastRow As Range Set FirstRow = Range("C1").End(xlDown).Offset(1, 0)
Range("E1").End(xlDown).Offset(0, -2).Select
Range(FirstRow, LastRow).FormulaR1C1 = "=(c4-14)"`
OP_wb.Sheets("Optic Main").Activate Range("C1").End(xlDown).Offset(1, 0).Activate ActiveCell.FormulaR1C1 = "=RC[1]-14"
– Rafael OsipovDim FirstRow As Range Dim LastRow As Range Set FirstRow = Range("C1").End(xlDown).Offset(1, 0) Set LastRow = Range("E1").End(xlDown).Offset(0, -2) Range(FirstRow, LastRow).FormulaR1C1 = "=(RC4-14)"
– Rafael Osipov