Autohide Rows based on condition

  • Thread starter Thread starter Supriya
  • Start date Start date
S

Supriya

How do I Autohide the rows when there is no entry, & show them when an
entry is made?
 
Supriya said:
How do I Autohide the rows when there is no entry, & show them when an
entry is made?
That's a clever concept - entering data into hidden rows(:-)

Peter
 
tr
For row=1 to lastro
if condition then cells(row,1).entirerow.hid
Next
 
Let me elaborate.
I have 2 sheets "call details" and "Reports"

The columns of Reports make cell reference to cells in Call Details
which contains formulas. So, 0 is shown if no calculations ar
done(condition). I want the rows in reports to be shown only if it ha
values(based on cell reference). Until then it should be hidden
 
So for example, you have a formula in column A, which gives either TRUE or FALSE, and you have 20 rows of data. You could call procedure from worksheet_activate or data_change

sub ShowOnlyTrueRows
for row=1 to 20
if cells(row,1)=true then
cells(row,1).entirerow.hide
else
cells(row,1).entirerow.unhide
end if
next
end sub
 
How to call the Procedure from worksheet_activate?

Where to write the code
 

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

Back
Top