I would like to modify the following macro.
Dim i As Long
.Calculation = xlCalculationManual
.ScreenUpdating = False
For i = Selection.Rows.Count To 1 Step -1
If Selection.Cells(i, 1) = "" And (Selection.Cells(i, 2) = 0 Or _ Selection.Cells(i, 2) = "0.00") Then
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
I have a spreadsheet with 2 columns, Column A and Column B.
Column A usually has numbers such as 12345. Column B at times is blank or has numbers.
In the following scenario, if it finds a number, in the spreadsheet, say 99999:
In the scenario above, when it finds a number which has some 'corresponding' blank fields underneath it, yet has some
numbers in Field B. It will assume that the last blank row, before another number begins, is the Total. The script should then move the last number it finds in the first row and insert a 0 in the other rows.
In other words it should end up looking like this.