+ Reply to Thread
Results 1 to 3 of 3

Using Indirect() to get dynamic references in an array formula

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    Johannesburg
    MS-Off Ver
    2013
    Posts
    9

    Using Indirect() to get dynamic references in an array formula

    Hi Everyone.
    I have struggled for about a day now to solve this but have not found the correct answer yet.
    I think I am close however.
    I have this array formula:

    =IF(ISERROR(MATCH(1,([TIMS.xlsx]Sheet1!$A$453:$A$7292=$H84)*([TIMS.xlsx]Sheet1!$B$453:$B$7292=J$83),0)),"",MATCH(1,([TIMS.xlsx]Sheet1!$A$453:$A$7292=$H84)*([TIMS.xlsx]Sheet1!$B$453:$B$7292=J$83),0))

    which works fine.

    The row numbers in red above, however, need to be dynamic.

    I have tried referring to cells with a changeable reference with the indirect function but they do not seem to operate properly inside the array.

    Such as:

    IF(ISERROR(MATCH(1,(INDIRECT(F78&F79&H77)&":"&INDIRECT(F78&F79&I77)=$H84)*(INDIRECT(F78&F79&H78)&":"&INDIRECT(F78&F79&I78)=I$83),0)),"",MATCH(1,(INDIRECT(F78&F79&H77)&":"&INDIRECT(F78&F79&I77)=$H84)*(INDIRECT(F78&F79&H78)&":"&INDIRECT(F78&F79&I78)=I$83),0))


    I have also generated a dynamic cell with the address function and then used indirect to refer it.
    Somehow this looks more hopeful as the array formula behaves differently.

    Such as:

    =IF(ISERROR(MATCH(1,(INDIRECT(F76)....


    Am I on the right track?

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Using Indirect() to get dynamic references in an array formula

    Hi.

    You should be constructing a single INDIRECT clause for each range, not two separated by a semi-colon.

    I don't know what you have in F78, F79 and H77, but, to generate a string equivalent to:

    [TIMS.xlsx]Sheet1!$A$453:$A$7292

    you should be using a single INDIRECT.

    Perhaps if you could post an actual workbook and explain precisely what these references need to be then that would help.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    02-07-2014
    Location
    Johannesburg
    MS-Off Ver
    2013
    Posts
    9

    Re: Using Indirect() to get dynamic references in an array formula

    Thank you XOR LX for your input. I think I followed your suggestion without knowing it at the time.

    What I did was:


    H78: ="[Tims.xlsx]Sheet1!$A$"&INDIRECT(ADDRESS(3,2,1,1,"Lookup"))+20&":$A$"&INDIRECT(ADDRESS(3,2,1,1,"Lookup"))+7292

    (H79 is similar.)


    Then the link to H78: {=IF(ISERROR(MATCH(1,(INDIRECT($H$78)=$H84)*(INDIRECT($H$79)=I$83),0)),"",MATCH(1,(INDIRECT($H$78)=$H84)*(INDIRECT($H$79)=I$83),0))}


    This is producing the correct answers whether everything I have done is completely necessary or not.


    Thanks XOR LX 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. Replies: 6
    Last Post: 10-22-2014, 09:07 AM
  2. [SOLVED] Using INDIRECT with a dynamic range name as the array in an INDEX formulae = #REF
    By Gandalf21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2013, 09:27 AM
  3. Indirect references in Array formulae
    By ninsine in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-30-2013, 09:16 AM
  4. [SOLVED] Need to create a dynamic array of cell references for MINVERSE
    By ATLGator in forum Excel General
    Replies: 1
    Last Post: 03-26-2012, 10:49 AM
  5. Replies: 1
    Last Post: 02-18-2012, 10:31 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