+ Reply to Thread
Results 1 to 4 of 4

Problem using GO TO function in a macro on a large workbook.

  1. #1
    BP
    Guest

    Problem using GO TO function in a macro on a large workbook.

    Using Excel 97 on Windows XP. (This workbook was originally created in Excel
    4.0.)
    I use a large excel workbook to do construction estimating.
    The WB consists of a main sheet that contains BUTTONS that were created and
    assigned to macros on a master macro sheet in the WB. The buttons take you
    to the specific section of another worksheet that contains the cells that
    return the total on the row corresponding to the button. Those sections are
    NAMED RANGES.

    The macro consists simply of:
    =FORMULA.GOTO(Sheet & Named Range)
    =SELECT ("RC3")

    The NAMED RANGES are created by going INSERT > NAME > DEFINE , and then
    selecting a group of cells that fill the screen.
    The SELECT command places you on the first cell that requires data entry in
    the section.

    Now, when the workbook is first set up all works great. Press the button and
    you go to the correct section front and center and you're in the cell to
    start work. But a problem arises because it is inherently necessary to add
    rows to each new sheet due to the unique conditions found on varying
    projects. When rows are added, pushing the original rows down, the relative
    position of the named range does not move with it. Excel keeps the range in
    the particular area on the worksheet, not on the group of cells selected, so
    when you use the button after adding rows the section you are going to is
    far down on the screen or off the screen in some instances.

    I know there must be a way to do what I want, I'm just not smart enough to
    figure it out. I've tried "Locking" the cells using the $ symbol in the
    named range but that didn't work. Any help?



  2. #2
    Gord Dibben
    Guest

    Re: Problem using GO TO function in a macro on a large workbook.

    BP

    Check out Debra Dalgleish's site for tips on how to create a "dynamic" range
    that expands to cover added rows.

    http://www.contextures.on.ca/xlNames01.html#Dynamic



    Gord Dibben Excel MVP

    On Fri, 18 Feb 2005 09:38:50 -0500, "BP" <[email protected]> wrote:

    >Using Excel 97 on Windows XP. (This workbook was originally created in Excel
    >4.0.)
    >I use a large excel workbook to do construction estimating.
    >The WB consists of a main sheet that contains BUTTONS that were created and
    >assigned to macros on a master macro sheet in the WB. The buttons take you
    >to the specific section of another worksheet that contains the cells that
    >return the total on the row corresponding to the button. Those sections are
    >NAMED RANGES.
    >
    >The macro consists simply of:
    >=FORMULA.GOTO(Sheet & Named Range)
    >=SELECT ("RC3")
    >
    >The NAMED RANGES are created by going INSERT > NAME > DEFINE , and then
    >selecting a group of cells that fill the screen.
    >The SELECT command places you on the first cell that requires data entry in
    >the section.
    >
    >Now, when the workbook is first set up all works great. Press the button and
    >you go to the correct section front and center and you're in the cell to
    >start work. But a problem arises because it is inherently necessary to add
    >rows to each new sheet due to the unique conditions found on varying
    >projects. When rows are added, pushing the original rows down, the relative
    >position of the named range does not move with it. Excel keeps the range in
    >the particular area on the worksheet, not on the group of cells selected, so
    >when you use the button after adding rows the section you are going to is
    >far down on the screen or off the screen in some instances.
    >
    >I know there must be a way to do what I want, I'm just not smart enough to
    >figure it out. I've tried "Locking" the cells using the $ symbol in the
    >named range but that didn't work. Any help?
    >



  3. #3
    BP
    Guest

    Re: Problem using GO TO function in a macro on a large workbook.

    That looks promising. I'll give it a go and post back if it works. Thanks.

    "Gord Dibben" <gorddibbATshawDOTca> wrote in message
    news:[email protected]...
    > BP
    >
    > Check out Debra Dalgleish's site for tips on how to create a "dynamic"
    > range
    > that expands to cover added rows.
    >
    > http://www.contextures.on.ca/xlNames01.html#Dynamic
    >
    >
    >
    > Gord Dibben Excel MVP
    >
    > On Fri, 18 Feb 2005 09:38:50 -0500, "BP" <[email protected]> wrote:
    >
    >>Using Excel 97 on Windows XP. (This workbook was originally created in
    >>Excel
    >>4.0.)
    >>I use a large excel workbook to do construction estimating.
    >>The WB consists of a main sheet that contains BUTTONS that were created
    >>and
    >>assigned to macros on a master macro sheet in the WB. The buttons take you
    >>to the specific section of another worksheet that contains the cells that
    >>return the total on the row corresponding to the button. Those sections
    >>are
    >>NAMED RANGES.
    >>
    >>The macro consists simply of:
    >>=FORMULA.GOTO(Sheet & Named Range)
    >>=SELECT ("RC3")
    >>
    >>The NAMED RANGES are created by going INSERT > NAME > DEFINE , and then
    >>selecting a group of cells that fill the screen.
    >>The SELECT command places you on the first cell that requires data entry
    >>in
    >>the section.
    >>
    >>Now, when the workbook is first set up all works great. Press the button
    >>and
    >>you go to the correct section front and center and you're in the cell to
    >>start work. But a problem arises because it is inherently necessary to add
    >>rows to each new sheet due to the unique conditions found on varying
    >>projects. When rows are added, pushing the original rows down, the
    >>relative
    >>position of the named range does not move with it. Excel keeps the range
    >>in
    >>the particular area on the worksheet, not on the group of cells selected,
    >>so
    >>when you use the button after adding rows the section you are going to is
    >>far down on the screen or off the screen in some instances.
    >>
    >>I know there must be a way to do what I want, I'm just not smart enough to
    >>figure it out. I've tried "Locking" the cells using the $ symbol in the
    >>named range but that didn't work. Any help?
    >>

    >




  4. #4
    BP
    Guest

    Re: Problem using GO TO function in a macro on a large workbook.

    No, unfortunately that was not the fix I needed. That allows me to expand
    the number of rows within the range, but does not fix the range in the
    sheet.
    Maybe I need to try another approach?

    "BP" <[email protected]> wrote in message
    news:[email protected]...
    > That looks promising. I'll give it a go and post back if it works. Thanks.
    >
    > "Gord Dibben" <gorddibbATshawDOTca> wrote in message
    > news:[email protected]...
    >> BP
    >>
    >> Check out Debra Dalgleish's site for tips on how to create a "dynamic"
    >> range
    >> that expands to cover added rows.
    >>
    >> http://www.contextures.on.ca/xlNames01.html#Dynamic
    >>
    >>
    >>
    >> Gord Dibben Excel MVP
    >>
    >> On Fri, 18 Feb 2005 09:38:50 -0500, "BP" <[email protected]> wrote:
    >>
    >>>Using Excel 97 on Windows XP. (This workbook was originally created in
    >>>Excel
    >>>4.0.)
    >>>I use a large excel workbook to do construction estimating.
    >>>The WB consists of a main sheet that contains BUTTONS that were created
    >>>and
    >>>assigned to macros on a master macro sheet in the WB. The buttons take
    >>>you
    >>>to the specific section of another worksheet that contains the cells that
    >>>return the total on the row corresponding to the button. Those sections
    >>>are
    >>>NAMED RANGES.
    >>>
    >>>The macro consists simply of:
    >>>=FORMULA.GOTO(Sheet & Named Range)
    >>>=SELECT ("RC3")
    >>>
    >>>The NAMED RANGES are created by going INSERT > NAME > DEFINE , and then
    >>>selecting a group of cells that fill the screen.
    >>>The SELECT command places you on the first cell that requires data entry
    >>>in
    >>>the section.
    >>>
    >>>Now, when the workbook is first set up all works great. Press the button
    >>>and
    >>>you go to the correct section front and center and you're in the cell to
    >>>start work. But a problem arises because it is inherently necessary to
    >>>add
    >>>rows to each new sheet due to the unique conditions found on varying
    >>>projects. When rows are added, pushing the original rows down, the
    >>>relative
    >>>position of the named range does not move with it. Excel keeps the range
    >>>in
    >>>the particular area on the worksheet, not on the group of cells selected,
    >>>so
    >>>when you use the button after adding rows the section you are going to is
    >>>far down on the screen or off the screen in some instances.
    >>>
    >>>I know there must be a way to do what I want, I'm just not smart enough
    >>>to
    >>>figure it out. I've tried "Locking" the cells using the $ symbol in the
    >>>named range but that didn't work. Any help?
    >>>

    >>

    >
    >




+ 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