rows for visible cells

M

mf_digger

Hi,

I need to capture only those rows which are visible in xls (but not hidden)
in my macro. Could some one plz help me in this regard. I

I understand how to select only the visible cells (shown below) but how can i
capture the rows or row number only for the visible cells.

for eg:

Range("A1:A6").Select
Selection.SpecialCells(xlCellTypeVisible).Select

Thanks
digger
 
G

Guest

Digger:

You just need to use the entirerow as in:

Range("A1:A6").SpecialCells(xlCellTypeVisible).EntireRow.Select

BTW you don't need select selection you can do in with the range object.
 
M

mf_digger via OfficeKB.com

Hi Martin,

Thank you for your response. But i need to capture the row number which are
visible only

for eg:

Rows: (total rows)
1
2
3
4
5

Rows (visible only rows, and remaining are hidden)

1
3
5

now i have to capture only the visible row numbers (1, 3, 5) in my loop logic,
please help me in achieving this?

Martin said:
Digger:

You just need to use the entirerow as in:

Range("A1:A6").SpecialCells(xlCellTypeVisible).EntireRow.Select

BTW you don't need select selection you can do in with the range object.
[quoted text clipped - 11 lines]
Thanks
digger
 

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