unhidden row

D

Don Guillett

I never felt a need to do this but this should do it.

Sub numbervisiblerows()
mc = 2'column number to check 2 is column B
For i = 1 To Cells(Rows.Count, mc).End(xlUp).Row
If Rows(i).Hidden = False Then Cells(i, mc -1) = j
j = j + 1
Next i
End Sub
 
N

Nahc

sorry sir, is there a simpler explanation ?

Don Guillett said:
I never felt a need to do this but this should do it.

Sub numbervisiblerows()
mc = 2'column number to check 2 is column B
For i = 1 To Cells(Rows.Count, mc).End(xlUp).Row
If Rows(i).Hidden = False Then Cells(i, mc -1) = j
j = j + 1
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 

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

Top