+ Reply to Thread
Results 1 to 3 of 3

MATCH function within INDIRECT function not working

  1. #1
    Registered User
    Join Date
    03-23-2009
    Location
    Ballina, Australia
    MS-Off Ver
    Excel 2013
    Posts
    22

    Smile MATCH function within INDIRECT function not working

    Hi all excel gurus

    I have hit a brick wall and would appreciate some input.

    I have a formula in a worksheet called Trading FY1011, which returns the interest for a particular financial year once a match occurs in an interest worksheet called INTEREST FY1011.

    In Trading FY1011, cell A1 = FY1011 which is returned from the sheet tab name ie Trading FY1011.

    The current formula which is specific to one worksheet works a treat:
    =INDIRECT("'INTEREST FY1011'!B"&MATCH(J5,'INTEREST FY1011'!$A$1:$A$50)).

    What I want to achieve is to make the formula generic so that as new trading worksheets are created for future financial years the formulas reference cell A1 which will update to reflect the current sheet financial year status eg FY 1112, FY 1213 etc.

    I have managed to modify the INDIRECT component of the current formula. So when I substitute
    "'INTEREST FY1011'!B" with "'INTEREST"&" "&A1&"'!B" it works well as in the second formula below ie.
    =INDIRECT("'INTEREST"&" "&A1&"'!B"& MATCH(J5,'INTEREST FY1011'!$A$1:$A$50)).

    However when I try to modify the second element of the MATCH function I hit the snag. When I substitute 'INTEREST FY1011'!$A$1:$A$50 with "'INTEREST" & " " & A1 & "'!" &"$A$1:$A$50" as in the formula below:
    =INDIRECT("'INTEREST"&" "&A1&"'!B"&MATCH(J5,"'INTEREST" & " " & A1 & "'!" &"$A$1:$A$50")) it fails.
    Can anyone highlight if there is something missing or is the second element of the MATCH function not receptive to the referenced data in cell A1.

    Many thanks for any insights.

    Cheers
    mgerada
    Last edited by mgerada; 09-04-2011 at 08:38 AM.

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: MATCH function within INDIRECT function not working

    Hi,

    you could try to add INDIRECT inside MATCH references.

    =INDIRECT("'INTEREST"&" "&&A1&"'!B"&MATCH(J5,INDIRECT("'INTEREST"&" "&&A1&"'!" &"$A$1:$A$50")))

    Regards
    Last edited by canapone; 09-04-2011 at 12:27 AM.

  3. #3
    Registered User
    Join Date
    03-23-2009
    Location
    Ballina, Australia
    MS-Off Ver
    Excel 2013
    Posts
    22

    Smile Re: MATCH function within INDIRECT function not working

    Hi Canapone

    It works!! Well done. Very elegant.

    Many thanks for your help.

    mgerada

+ 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