Find/then place formula in column C
Posted by Andonny on January 18, 2001 2:00 AM
I found the code below and it deletes all rows with the number 13 in culumn A. I was hoping somebody would be able to modify it that whenever it finds 13 in culumn A it puts the formula =A-B in column C instead of deleting the row.
Thanks a lot in advance.
Dim RowNum As Integer
Dim LastRow, LastCol As Integer
LastRow = .UsedRange.Rows.Count
LastCol = .UsedRange.Columns.Count
' Now delete rows if formula in column A is thirteen
For RowNum = LastRow To 1 Step -1
If Range("A" & RowNum).Value = 13 Then