ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   For Each with Hidden Rows (https://www.excelbanter.com/excel-programming/314812-each-hidden-rows.html)

tod

For Each with Hidden Rows
 
My worksheet has hidden rows. Which rows are hidden is
not known at run time. I want to do a For Each... loop
that cycles through a range of cells in a column. However
I've noticed that the loop ignores cells in hidden rows.
Is there a way to cycle through a range that includes
hidden rows?

tod

Tod[_3_]

For Each with Hidden Rows
 
Oops. It wasn't that the loop was skipping hidden rows.
It was that my statement for finding the last row was
flawed.

So as Emily Litella would say....

Never Mind


-----Original Message-----
My worksheet has hidden rows. Which rows are hidden is
not known at run time. I want to do a For Each... loop
that cycles through a range of cells in a column.

However
I've noticed that the loop ignores cells in hidden rows.
Is there a way to cycle through a range that includes
hidden rows?

tod
.


Frank Kabel

For Each with Hidden Rows
 
Hi
post the code you have used :-)

--
Regards
Frank Kabel
Frankfurt, Germany

"Tod" schrieb im Newsbeitrag
...
My worksheet has hidden rows. Which rows are hidden is
not known at run time. I want to do a For Each... loop
that cycles through a range of cells in a column. However
I've noticed that the loop ignores cells in hidden rows.
Is there a way to cycle through a range that includes
hidden rows?

tod



Myrna Larson

For Each with Hidden Rows
 
I can't duplicate your problem. If I hide 4 rows between 1 and 15, then run
the following code, 1 see all 15 row numbers. Ditto if the rows are hidden via
AutoFilter. Can you post your code?

for i = 1 to 15: debug.Print rows(i).row: next i
for each r in range("A1:A15").rows: debug.Print r.row: next r


On Tue, 26 Oct 2004 12:59:35 -0700, "Tod" wrote:

My worksheet has hidden rows. Which rows are hidden is
not known at run time. I want to do a For Each... loop
that cycles through a range of cells in a column. However
I've noticed that the loop ignores cells in hidden rows.
Is there a way to cycle through a range that includes
hidden rows?

tod




All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com