View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Hiding Rows in a Range based on column A value

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