+ Reply to Thread
Results 1 to 6 of 6

Alternative to using INDIRECT for dynamic references to other sheets

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Alternative to using INDIRECT for dynamic references to other sheets

    I've attached a sheet which shows the formulas in one row (of about 100) of a worksheet in a fairly large workbook. This particular sheet culls and organizes the data in the numbered worksheets (about 70 of them).

    I'd like to make the workbook more efficient (as it hangs and crashes), so I'm assuming one of the culprits is my liberal use of INDIRECT, which refers to the numbered worksheets in order to get various cell values in them.

    Is there a solution for me to use a non-volatile function for this? The worksheet numbers do change from time to time as I add data to my project, if this matters.

    Thanks for your assistance.
    Attached Files Attached Files
    Last edited by jrtaylor; 06-10-2021 at 06:48 PM. Reason: correct title

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to use INDEX or MATCH in formula which refers to a worksheet name

    Having 7,000 cells with INDIRECT could possibly slow things down, although it shouldn't be crashing. There is no non-volatile function (that I know of) that can reference different worksheets dynamically.

    One solution would be using VBA to populate and subsequently refresh the formulas. The VBA could be set up to run only if something changes in row 9, the list of sheet names.

    By the way, your title does not really describe your problem. You are asking to use INDEX and MATCH, assuming that's the solution, but it probably isn't. I would recommend:

    Alternative to using INDIRECT for dynamic references to other sheets
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: How to use INDEX or MATCH in formula which refers to a worksheet name

    Thanks Jeff. I changed the title per your suggestion! Yes, its strange. My desktop has an I7-7700 with 16GB RAM, SSD etc. so I'm assuming that's not the issue. The workbook has 70 sheets X avg of 3,000 rows and 26 columns (very roughly about 5.4mm cells, but not all columns use 3,000 rows). It uses INDIRECT 210 times, mostly on one sheet. I'll think about VBA, and also just hard-coding as many of the INDIRECT functions as possible.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,599

    Re: Alternative to using INDIRECT for dynamic references to other sheets

    Here is the work sheet event . When B column value is changed ,in the same row all formulas are changed automatically. Indirect not required. Hence problem will not be there.
    In the initial stage to change all rows formulas. Cut the range say B10:B100. Paste the same in different column. Column B is blank now . Now paste back the data to B column. All rows formulas are now changed.
    Code :
    Please Login or Register  to view this content.
    Worksheetevent

    To paste the code
    Right click on Sheet tab --> view code
    Visual Basic (VB) window opens.
    Paste the code
    Close the VB window.
    Save the file
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 06-11-2021 at 07:36 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,599

    Re: Alternative to using INDIRECT for dynamic references to other sheets

    I did not see number of pages as 70.
    To convert formulas in all sheets macro code.

    Please Login or Register  to view this content.
    Worksheet event is also required to change formulas as and when column B value changed.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: Alternative to using INDIRECT for dynamic references to other sheets

    I appreciate your help on this, and will create the VBA. Thanks again for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Index match formula from sales data worksheet to receivable worksheet
    By sunboy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-27-2020, 02:55 PM
  2. Replies: 7
    Last Post: 10-03-2019, 11:23 AM
  3. [SOLVED] Index Match formula for dashboard worksheet
    By SurfexcelIT in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-24-2016, 03:50 AM
  4. Replies: 3
    Last Post: 02-21-2014, 10:02 AM
  5. Error in Index & Match Formula due to Defined Names Worksheet is Getting Changed!
    By Rajeshkumar R in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2013, 08:37 AM
  6. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  7. Replies: 2
    Last Post: 01-13-2012, 05:21 PM

Tags for this Thread

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