+ Reply to Thread
Results 1 to 16 of 16

Constructing cell references to another sheet without INDIRECT (or any volatile function)

  1. #1
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Question Constructing cell references to another sheet without INDIRECT (or any volatile function)

    Hi all.

    I'm still looking to move away from volatile functions but am stumped on this one. Where these cells hold the following:

    A1 = Sheet Name
    A2 = Column Letter
    A3 = Row Number

    ..I can easily reference a cell on another sheet by using:

    =INDIRECT("'"&A1&"'!"&A2&A3)

    I have need to construct something like this multiple times where the references will change based on using different sources other than A1, A2 and A3.

    But INDIRECT is volatile, and I can't seem to make it work with INDEX.

    Are there any non-volatile functions that I can use? Or is the very nature of doing this volatile in itself?

    With thanks as always - will add reputation and mark complete as soon as someone is able to help!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    The short answer is that you can't do this without INDIRECT.

    The slightly longer answer, given that you have 365, is that you could combine the relevant data from multiple sheets and then filter it to what you want, but I'd need to see a sample workbook to be able to confirm how easy (or not) that might be.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Oh well, I thought that might be the case. INDIRECT it is!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Are you not interested in my possible alternative, then?

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,023

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    The hard part here is the sheet name. I can't think of another formula solution to reference cells with a dynamic sheet name other than INDIRECT. (Someone else may.)

    One solution is using VBA to build the formulas as needed. Any time A1, A2, or A3 changes the code would rebuild the formula as a static formula.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  6. #6
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Quote Originally Posted by AliGW View Post
    Are you not interested in my possible alternative, then?
    I think, if I understand your suggestion correctly and based on the use case and how I've structured my workbook, it sadly won't be possible. Plus it's a work document which I wouldn't be able to share regardless, unfortunately.

    Your help is, as always Ali, appreciated - hence the Reputation I left upon your first reply!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    I would only need to see a sample with the same structure - dummy data fine.

  8. #8
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Quote Originally Posted by 6StringJazzer View Post
    The hard part here is the sheet name. I can't think of another formula solution to reference cells with a dynamic sheet name other than INDIRECT. (Someone else may.)

    One solution is using VBA to build the formulas as needed. Any time A1, A2, or A3 changes the code would rebuild the formula as a static formula.
    I'm also trying to avoid VBA though, which I appreciate isn't always everyone else's preferences but it's mine on this occasion. So if such an alternate formula does exist, that would be fantastic!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    See post #7 ...

  10. #10
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Et voila!

    Constructed References without INDIRECT.xlsx

    This is a dummy structure but, in reality, there's a ton more info on each tab and the tabs run to higher numbers. Obviously they'll also adjust dynamically if one's deleted, which sometimes will happen and a new one created in its place.

    Looking forward to your thoughts as always Ali and thank you in advance.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Well, based on the data given, I'd do this:

    =WRAPROWS(TOCOL(VSTACK('TAB 1:TAB 4'!C3:C9),1),4)

    You could have a tab callled START and one called FINISH and just ensure that all tabs to be referenced are between them:

    =WRAPROWS(TOCOL(VSTACK('START:FINISH'!C3:C9),1),4)

  12. #12
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Thank you as always Ali. I'm not familiar with this function.

    When I added TAB 5 into the mix, the summary sheet didn't update automatically and I had to change the formula to capture it. Is this expected behaviour?

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Not if you used my second suggestion.

    Offline now for the evening, but will look in again in the morning.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    Good morning!

    Attached is a version of your sample file with the two empty tabs added and the formula changed accordingly. Now, if you add any more tabs between these two (i.e. TAB 5), then their contents will be added to the summary tab.

    Try it and see if it has legs in your situation. We can then take it further, if you wish.

  15. #15
    Registered User
    Join Date
    09-25-2009
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    40

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    I can't add reputation again sadly as I've done it too recently, but you've gone over and above as usual Ali. I'm not familiar with this function at all, but it looks like it's working very well indeed.

    In the real-life version my data is drawing from lots of difference places rather than neatly in the columns in the dummy version, but I'm assuming I can easily modify it for that. I'd still be curious to know if a non-volatile function exists that's similar to INDIRECT but this could absolutely be the replacement in the long-term for larger tasks.

    Thank you very much again and have a wonderful weekend

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Constructing cell references to another sheet without INDIRECT (or any volatile functi

    but I'm assuming I can easily modify it for that
    Most likely, but to be sure, I'd need to see a small sample. Column headers would certainly need to match.

    I'd still be curious to know if a non-volatile function exists that's similar to INDIRECT
    It's the only way without VBA, other than the approach I've suggested.

    Don't worry about rep this time - I get plenty!!!

    Have a lovely weekend.

+ 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] How to rebuild this formula without the (volatile) INDIRECT function?
    By schnide in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-10-2024, 02:28 PM
  2. If indirect function is volatile within named range?
    By jaryszek in forum Excel General
    Replies: 8
    Last Post: 03-28-2022, 09:47 AM
  3. Refer to cell name without volatile INDIRECT function
    By jaryszek in forum Excel General
    Replies: 12
    Last Post: 09-24-2020, 12:26 AM
  4. [SOLVED] Indirect in Data validation list as volatile function
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2019, 03:59 AM
  5. How to avoid indirect volatile function
    By jaryszek in forum Excel General
    Replies: 19
    Last Post: 03-11-2019, 08:47 AM
  6. INDIRECT sheet references within LOOKUP function
    By PeterScho in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-28-2016, 12:34 PM
  7. Non-volatile substitute for INDIRECT function
    By AndyFarrell79 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-24-2014, 03:29 AM

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