Hide/unhide sheet macro based on cell calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet that calculates regions in the US. Based on a user
input of city, state I have a lookup that return the region. Each worksheet
ties to the region (ie Region 01) that is returned from the user input. I
created another lookup in case there are multiple returns of the region,
where I have a column that retuns only unique regions. THis is where I need
a macro that will unhide the sheet if the region is named. I have tried
other code from this website, however, it is event enabled and requires a
direct input. Is there something that will work off calculations?
 
The calculate event is associated with calculations, but isn't specific to a
given cell.

But it seems like the changing of a cell would trigger the calculate, so why
not the change event?
 
I do not understand why this does not work. I have changed the value of cell
C3 directly, and the macro works. If I have a reference in another sheet to
cell C3 and chage it on the other sheet, it will not work when the
spreadsheet calcs and updates cell C3. For some reason, the macro does not
run.
 
Change only triggers on a physical edit in this type of situation. You
would need to use the change event where you actually make the change.
 

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