+ Reply to Thread
Results 1 to 10 of 10

Problem with index and match with two array value

  1. #1
    Registered User
    Join Date
    04-01-2021
    Location
    Indonesia, Jakarta
    MS-Off Ver
    2019
    Posts
    5

    Post Problem with index and match with two array value

    Hi!
    My lecture gave me a task.
    I need to match the "Price" with 3 criteria in different tables
    I've been stuck for a week.
    Maybe this forum can help me
    HELP.png
    Attached Files Attached Files
    Last edited by TIGERNOSE; 04-02-2021 at 06:03 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Problem with index and match with two array value

    It would help if you attached a sample Excel workbook, rather than a picture of one - see the yellow banner at the top of the screen for guidance on how to do this.

    Your third table seems to contain only AGENT as the source, so your formula in D2 could be arranged along the lines of:

    =IF(B2="AGENT","Use table in K:N","Use table in F:I")

    Do you have to use INDEX/MATCH? You could use SUMIFS instead.

    As this is clearly an assignment from your lecturer, I won't give you the exact answer, but that should get you along the way.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-01-2021
    Location
    Indonesia, Jakarta
    MS-Off Ver
    2019
    Posts
    5

    Re: Problem with index and match with two array value

    Thanks for helping me to solve the task.
    I have uploaded the workbook.
    Can you show me how it looks with sumif formula?

    There are many agents in the tables, i just show one agent.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Problem with index and match with two array value

    You can use this formula in D3:

    =IF(B3="AGENT",SUMIFS(N:N,K:K,A3,M:M,C3),SUMIFS(I:I,F:F,A3,G:G,B3,H:H,C3))

    then copy down as required.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    04-01-2021
    Location
    Indonesia, Jakarta
    MS-Off Ver
    2019
    Posts
    5

    Re: Problem with index and match with two array value

    Thanks Pete, I already use your formula. It works.
    But, what if the source from the table 3 have another "AGENT" i mean, something like "AGENT WASHINGTON", "AGENT TOKYO", and another hundred of different source agent.
    It's a lot of work if i type all of different source.
    i hope there is another alternatif formula

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Problem with index and match with two array value

    Try:

    Please Login or Register  to view this content.
    Quang PT

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Problem with index and match with two array value

    Look at how you might "extract" the text agent from a text such as "AGENT WASHINGTON" and "AGENT TOKYO"

    =IF(B3="contains the text AGENT",SUMIFS(N:N,K:K,A3,M:M,C3),SUMIFS(I:I,F:F,A3,G:G,B3,H:H,C3))


    "contains the text AGENT" needs to be replaced by a formula: HINT look at LEFT, RIGHT, MID functions

  8. #8
    Registered User
    Join Date
    04-01-2021
    Location
    Indonesia, Jakarta
    MS-Off Ver
    2019
    Posts
    5

    Re: Problem with index and match with two array value

    Thank you so much bebo021999, your formula works like a charm.

  9. #9
    Registered User
    Join Date
    04-01-2021
    Location
    Indonesia, Jakarta
    MS-Off Ver
    2019
    Posts
    5

    Re: Problem with index and match with two array value

    Okay, now i know what do you mean. It works more specific and i will use your formula instead. Thanks for helping me to solve the task
    Last edited by TIGERNOSE; 04-02-2021 at 06:01 AM.

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Problem with index and match with two array value

    Your sample data should be representative of your real data, showing the variations that you might encounter, not just one AGENT.

    You can use this type of construct:

    =IF(Source_in_B3 is in Table2,"use Table2","use Table3")

    and to determine if the "Source_in_B3 is in Table2" you can use:

    COUNTIF(G:G,B3)

    Can you put it all together from that?

    Pete

+ 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. Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  2. [SOLVED] Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  3. [SOLVED] Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  5. [SOLVED] Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  6. [SOLVED] Array index, match problem
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 54
    Last Post: 09-06-2005, 06:05 AM
  7. [SOLVED] Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. [SOLVED] Array index, match problem
    By RAP in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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