+ Reply to Thread
Results 1 to 11 of 11

multiple criteria MATCH macro

  1. #1
    Registered User
    Join Date
    06-05-2019
    Location
    texas
    MS-Off Ver
    2013
    Posts
    53

    multiple criteria MATCH macro

    hello I am trying to work this code but haven't found anything to what I am trying to accomplish. I have attached the workbook and the code I am working on-might be something off. what I am trying to accomplish is to bring the sales number from sheet2 to sheet 1 column D meeting the criteria from sheet 1 columns A and C.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: multiple criteria MATCH macro

    Why not just put this formula in D2 & copy down
    =SUMIFS(Sheet2!C:C,Sheet2!A:A,A2,Sheet2!B:B,C2)

  3. #3
    Registered User
    Join Date
    06-05-2019
    Location
    texas
    MS-Off Ver
    2013
    Posts
    53

    Re: multiple criteria MATCH macro

    the sumif function worked with numbers but I am wanting to do the same with the name (text), does anyone have recommendations?

  4. #4
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: multiple criteria MATCH macro

    Hi,

    Please Login or Register  to view this content.
    sorry, I don't see customerID in Sheet2 ?

    Or maybe did you mean "region" ?
    Please Login or Register  to view this content.
    What Fluff13 suggest is good if you just want to get the total sales from one name and his/her region. But....

    the sumif function worked with numbers but I am wanting to do the same with the name (text), does anyone have recommendations?
    But from your quote above, it seems what you want is not just to get the total sales ?

    If yes, I think it would be better if you describe about it also.

    Anyway, for the time being I think the modified code of yours below is maybe (I guess) what you want :
    Please Login or Register  to view this content.
    Last edited by karmapala; 06-29-2020 at 12:54 AM.

  5. #5
    Registered User
    Join Date
    06-05-2019
    Location
    texas
    MS-Off Ver
    2013
    Posts
    53

    Re: multiple criteria MATCH macro

    this is the other way I am attempting to work this out. I have attached the workbook and what I want to do is bring customerID from sheet2 referencing columns A and C from sheet1.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: multiple criteria MATCH macro

    How about
    =INDEX(Sheet2!$D$2:$D$11,MATCH(A2&"|"&C2,Sheet2!$A$2:$A$11&"|"&Sheet2!$B$2:$B$11,0))

    Needs Ctrl Shift Enter, rather than just enter.

  7. #7
    Registered User
    Join Date
    06-05-2019
    Location
    texas
    MS-Off Ver
    2013
    Posts
    53

    Re: multiple criteria MATCH macro

    I have the Ctrl Shift Enter option but was looking to see if there was a simpler option to automate.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: multiple criteria MATCH macro

    How about
    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: multiple criteria MATCH macro

    Quote Originally Posted by hgchas View Post
    this is the other way I am attempting to work this out. I have attached the workbook and what I want to do is bring customerID from sheet2 referencing columns A and C from sheet1.
    Is this a different case than your previous sample workbook ?
    A. In your first sample workbook, the CustomerID is in Sheet1,
    and I guess the result you want is to have the total sales in sheet1 (yellow highlighted column D).

    B. In your second sample workbook, the CustomerID is in Sheet2,
    and now the result you want is to have the CustomerID in sheet1 (yellow highlighted column B).

    Anyway, my way is using "find" for point-B :
    Please Login or Register  to view this content.
    Using three criteria, in case for example there is another John in the West but the customerID is different .
    Last edited by karmapala; 06-29-2020 at 12:39 PM.

  10. #10
    Registered User
    Join Date
    06-05-2019
    Location
    texas
    MS-Off Ver
    2013
    Posts
    53

    Re: multiple criteria MATCH macro

    hey everyone thanks for the input! Both solutions worked! thank you!

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: multiple criteria MATCH macro

    You're welcome & thanks for the feedback.

+ 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: 1
    Last Post: 03-25-2020, 08:06 AM
  2. Replies: 1
    Last Post: 03-01-2020, 10:36 PM
  3. index match for multiple criteria with one criteria being does not match
    By Mr Stern 2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2019, 08:16 AM
  4. Closest match with multiple criteria (3 criteria) Not matching perfectly!
    By JulianS96 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-04-2019, 10:50 AM
  5. Replies: 16
    Last Post: 01-05-2018, 11:04 PM
  6. Need help in Index, Match usage to match multiple criteria in sum function
    By Summer0830 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2017, 02:47 AM
  7. Replies: 2
    Last Post: 09-27-2014, 04:34 PM

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