I see now. The end(xlup) skips past the hidden rows at the bottom of your used range. So we need to find the last used cell in column B a slightly different way:
Sub Blankcells3()
Dim r As Range, l As Long
On Error GoTo NoBlanks
l = 191
Do Until Cells(l, 1).Value <> ""
l = l - 1
Loop
Set r = Range("C18:C" & l).SpecialCells(xlCellTypeBlanks)
MsgBox "Blank cells in " & Replace(r.Address(False, False), "C", ""), vbInformation + vbOKOnly, "Blanks"
Exit Sub
NoBlanks:
MsgBox "No blank cells found", vbInformation + vbOKOnly, "Blanks"
End Sub
Better?
Bookmarks