Hiding Rows Based on Cell Value

L

LarryP

I need to hide rows based on the value in Column AV, and can't use AutoFilter
because AV is not contiguous with other columns where I am already using
Autofilter for other purposes. I can't move the column to make it contiguous
either, as that would screw up other things.

So I'm looking for code that will say, for each row in the active worksheet,
if AV = "C", hide the row. (Yes, I'd probably want to limit it to only rows
that contain some data, rather than churning through all 65535 rows!) I'm
lost, though, as to how to refer to the relevant cell in column AV. Who can
help?
 
E

excelent

sub test()
for each c in range("av1:av1000") ' change range to fit
if c="C" then c.entirerow.hidden=true
next
end sub


"LarryP" skrev:
 

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