Is there a test to see if an entire row or column is empty?

  • Thread starter Thread starter Henry Stock
  • Start date Start date
Worksheet function -
=COUNTA(A:A)=0

Code -
? application.WorksheetFunction.CountA(sheets("sheet1").range("A:A"))
 
Hi Henry

Try this for the activecell row

If Application.CountA(Rows(ActiveCell.Row)) = 0 Then _
MsgBox "Row " & ActiveCell.Row & " Is empty"
 
COUNTA(A:A) will return 0 is column A is empty
COUNTA(10:10) will return 0 is row 10 is empty
best wishes
 

Ask a Question

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.

Ask a Question

Back
Top