You could take this a step further and do a one shot formula on all the cells in Column B that have a corresponding blank cell in Column E
ie this code inserts this formula into B5 if it qualifies
and this into E5
"XX"
Cheers
Dave
Sub NewLoop()
Dim Rg As Range
'there may be no blank cells
On Error Resume Next
'Find all cells in column B that have a corresponding blank cell in column E in the usedrange
Set Rg = Intersect(Range("E:E"), ActiveSheet.UsedRange, Cells.SpecialCells(xlCellTypeBlanks)).Offset(0, -3)
On Error GoTo 0
'Add the formula to the B cells and the XX to E cells
If Not Rg Is Nothing Then
Rg.FormulaR1C1 = "=IF(RC[-1]=R[-1]C[-1],R[-1]C+RC[1],RC[1])"
Rg.Offset(0, 3) = "XX"
End If
End Sub