Hiding Rows in a Range based on column A value
Hi,
Ignore my last post as your "print_range" is multiple columns UNLESS
you know ONLY column A will contain 1 or "1".
"Toppers" wrote:
Hi,
Why not ...
For each cell in Range("Print_Range")
If cell.value = 1 then
cell.entirerow.hidden=true
end if
next cell
"tig" wrote:
I've been rummaging through the posts regarding finding the last row in
a range. They don't quite get me what I need. My ultimate goal is to
created a sub that will hide all rows with the value of "1" in column
A. Without creating a loop for the entire worksheet I want to limit
the loop to a named range, let's say "print_range". To do that I need
to be able to identify the last row of the named range. I don't think
that the Count property will give me the last row if the range doesn't
begin in row 1.
Let's say my named range is from A5:Z999.
Any ideas or insights would be greatly appreciated.
TIA
|