+ Reply to Thread
Results 1 to 4 of 4

Hide/unhide sheet macro based on cell calculation

  1. #1
    Greg Fisher
    Guest

    Hide/unhide sheet macro based on cell calculation

    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?

  2. #2
    Tom Ogilvy
    Guest

    Re: Hide/unhide sheet macro based on cell calculation

    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?

    --
    Regards,
    Tom Ogilvy

    "Greg Fisher" <[email protected]> wrote in message
    news:[email protected]...
    > 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?




  3. #3
    Greg Fisher
    Guest

    Re: Hide/unhide sheet macro based on cell calculation

    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.


    "Tom Ogilvy" wrote:

    > 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?
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Greg Fisher" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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?

    >
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: Hide/unhide sheet macro based on cell calculation

    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.

    --
    Regards,
    Tom Ogilvy


    "Greg Fisher" <[email protected]> wrote in message
    news:[email protected]...
    > 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.
    >
    >
    > "Tom Ogilvy" wrote:
    >
    > > 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?
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Greg Fisher" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > 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?

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1