Sub countblankcells()
'MsgBox Selection.SpecialCells(xlCellTypeBlanks).Count
For Each c In range("a1:k10") 'Selection
If Len(Application.Trim(c)) < 1 Then mc = mc + 1
Next c
MsgBox mc
End Sub
I would have thought the line you commented out would do it ('MsgBox
Selection.SpecialCells(xlCellTypeBlanks).Count). Doesn't that work? I
guess it's so you'd count cells with spaces in them as blanks, but I wonder
if that's what Steven wants.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.