Hi, excel_joel,
Donīt know your data...
Macro will clear data in Column E and only work if there are values in Column D (if there are Formulas xlCellTypeConstants should be replaced with xlCellTypeFormulas):
Sub EF966687()
Dim rngCell As Range
Dim lngCount As Long
Range("E:E").Value = ""
On Error Resume Next
For Each rngCell In Range("D:D").SpecialCells(xlCellTypeConstants, 23)
If rngCell.Row - lngCount >= 10 Then Exit For
rngCell.Offset(0, 1).Value = WorksheetFunction.Max(WorksheetFunction.Max(Range("E1:E" & rngCell.Row)) + 1, 101)
lngCount = rngCell.Row
Next rngCell
If Err <> "" Then
MsgBox "No constants found in Coumn D"
End If
End Sub
Ciao,
Holger
Bookmarks