+ Reply to Thread
Results 1 to 10 of 10

Changing an indirect function to "Index / Match"

  1. #1
    Registered User
    Join Date
    03-20-2015
    Location
    Montréal, Canada
    MS-Off Ver
    2013
    Posts
    27

    Changing an indirect function to "Index / Match"

    Hi guys !!

    I would like to replace the indirect function to an index/match function in the following formula since I've read that it's going to have better performances impact.

    =SUMIF(INDIRECT(E6&"[Produit]");B6;INDIRECT(E6&"[Prix]"))

    Anyone could help me with this ? Since I don't understand the logic behind the index match functions >.<

    Thanks !
    Last edited by Keldion; 03-09-2016 at 05:35 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing an indirect function to "Index / Match"

    What's in E6, the name of the Table?

    If E6 is the name of the table, than what you're doing can't be done without Indirect.

  3. #3
    Registered User
    Join Date
    03-20-2015
    Location
    Montréal, Canada
    MS-Off Ver
    2013
    Posts
    27

    Re: Changing an indirect function to "Index / Match"

    Yes E6 is the name of the table...

    But what I've read here doesn't apply to table names ?

    http://superuser.com/questions/46107...ntent-in-excel

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing an indirect function to "Index / Match"

    To do it without Indirect, you'd have to explicitly name the table in the formula
    =SUMIF(Table1[Produit],B6,Table1[Prix])

    Unless the formula actually resides within the Table, then you don't need to name the table at all
    =SUMIF([Produit],B6,[Prix])

  5. #5
    Registered User
    Join Date
    03-20-2015
    Location
    Montréal, Canada
    MS-Off Ver
    2013
    Posts
    27

    Re: Changing an indirect function to "Index / Match"

    I need a formula that will look in different tables depending on a cell value, so I will stick with indirect it seems !

    Thanks for the help !

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing an indirect function to "Index / Match"

    You're welcome.

    The difference between your formula, and the formulas in the link you posted is
    The formulas in that link are varying the 'Column' used within the table. They still have to explicitly supply the Name of the Table.
    Your formula is varying the Name of the Table.

  7. #7
    Registered User
    Join Date
    03-20-2015
    Location
    Montréal, Canada
    MS-Off Ver
    2013
    Posts
    27

    Re: Changing an indirect function to "Index / Match"

    Yeah I though so.

    Now do you know how I could simply make this formula work with text ?

    =SUMIF(INDIRECT(E6&"[Produit]");B6;INDIRECT(E6&"[Prix]"))

    I just realized some cell have text content and I'm not familiar at all with index or lookup functions !
    (I don't need to add anything here, I just want the formula to pull specific cells that are in other tables)

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Changing an indirect function to "Index / Match"

    Ok, so you're not 'really' wanting to SUM the values in Prix based on the match in Produit.
    Instead, you just want to 'Return' the value in Prix corresponding to the row where B6 is found in Produit

    Right?

    Try
    =INDEX(INDIRECT(E6&"[Prix]");MATCH(B6;INDIRECT(E6&"[Produit]");0))

  9. #9
    Registered User
    Join Date
    03-20-2015
    Location
    Montréal, Canada
    MS-Off Ver
    2013
    Posts
    27

    Re: Changing an indirect function to "Index / Match"

    Exactly, it works, thanks ! :D

    Now my last challenge for this sheet

    Basically I have different tables with the same products, with prices and other data (they are different suppliers)

    Now I would like to have a formula that will check for the lowest price (prix) for a specific product (produit) in all the different tables and return a value (maybe the name of the table, but the lowest price itself might be quite easier).

    Do you know which function would be best for this ?

  10. #10
    Registered User
    Join Date
    03-20-2015
    Location
    Montréal, Canada
    MS-Off Ver
    2013
    Posts
    27

    Re: Changing an indirect function to "Index / Match"

    I will make a new post for this since it's another matter, thanks

+ 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. combining 'indirect' function with 'index/match"
    By wongth7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-20-2015, 09:38 AM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] Help with "You've entered too many arguments for this function" multiple INDEX(MATCH
    By BeachRock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2013, 06:10 PM
  4. [SOLVED] Alternatives to "INDEX(MATCH(" Function when Duplicates Exist
    By MidwestBen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-02-2013, 09:14 PM
  5. Strings Variables in Range("A1").Formula = "=index/match" ?
    By nadnerb5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2012, 05:07 PM
  6. [SOLVED] Variable "sheet-name" and "range-name" wanted in INDEX/MATCH-function
    By Fiebuls in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-01-2012, 04:09 PM
  7. [SOLVED] Index, Match & Countif ... Use with the "Rand" function
    By traceylreed in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-30-2012, 07:48 AM

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