_filterdatabase

G

Guest

Hi there,
Where does excel save the result of of a filterd selection, I thought it was
(for example on sheet 1) on sheet1!_filterdatabase

but when running:
Sub test1()
For Each cell In Range("sheet1!_filterdatabase")
Debug.Print cell.Value
Next cell
End Sub

I noticed it include all the table and not only the result.

Thanks
 
J

Jim Rech

A range includes all cells in it, including hidden rows. If you want just
visible rows:

Range("sheet1!_filterdatabase").SpecialCells(xlCellTypeVisible)

--
Jim
| Hi there,
| Where does excel save the result of of a filterd selection, I thought it
was
| (for example on sheet 1) on sheet1!_filterdatabase
|
| but when running:
| Sub test1()
| For Each cell In Range("sheet1!_filterdatabase")
| Debug.Print cell.Value
| Next cell
| End Sub
|
| I noticed it include all the table and not only the result.
|
| Thanks
 

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