Hiding Rows Based on Cell Value
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:
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?
|