To find number of non-empty cells across columns

  • Thread starter Thread starter Mark Stephens
  • Start date Start date
M

Mark Stephens

Hi guys,

I regularly use the following code to count the number of occupied rows in a
sheet:

Sheets(1).Cells(Rows.Count, "A").End(xlUp).row

I tried replacing ros with columns and A with 1 but it wont work for columns
(i.e. count the number of non empty cells in row 1).

Anyone know how to convert it into a column counter?

Help much appreciated, kind regards, Mark
 

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