+ Reply to Thread
Results 1 to 13 of 13

Get column result with multiple criteria

  1. #1
    Registered User
    Join Date
    08-11-2021
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    24

    Get column result with multiple criteria

    Hi,

    Please help me with the following problem.

    how can I get the column value with multiple criteria of rows matching.

    PD PN Q Jan Feb Mar
    A B 1 44 33 55
    C V 3 34 32 5

    if I have 4 textboxes specifying A, B, 1, and Jan respectively, I would like to get a value 44.

    Thank you.
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    Which version of Excel are you using? Is it still the OLD Excel 2007?

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-11-2021
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    24

    Re: Get column result with multiple criteria

    i am using excel 2007.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    OK. Explain how you arrive at the result of 44, please.

  5. #5
    Registered User
    Join Date
    08-16-2021
    Location
    Leeds
    MS-Off Ver
    2007
    Posts
    1

    Re: Get column result with multiple criteria

    Yes, please can you please elaborate your query in detail.

  6. #6
    Registered User
    Join Date
    08-11-2021
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    24

    Re: Get column result with multiple criteria

    i want to get the value of the month with the input of product id, product name, quantity and the month.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    Yes, but I cannot see where 44 comes from. Explain how you manually calculated 44.

  8. #8
    Registered User
    Join Date
    08-11-2021
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    24

    Re: Get column result with multiple criteria

    no. the 44 is just the example.

    if you refer to the pic, I want to the value 2 to be displayed in a textbox, if I input 1 for product ID abbd for product name, 34 for quantity and Feb for month.

    This is not about calculation. i just want to get the value with the multiple criteria.

    sorry for confusing.

    Capture.JPG

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    Try this:

    =SUMPRODUCT(($A$2:$A$16=M2)*($B$2:$B$16=M3)*($C$2:$C$16=M4)*($E$1:$K$1=M5),$E$2:$K$16)

    AliGW on MS365 Insider (Windows) 32 bit
    M
    N
    2
    1
    5
    3
    abbd
    4
    34
    5
    Feb
    Sheet: Sheet1

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  11. #11
    Registered User
    Join Date
    08-11-2021
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    24

    Re: Get column result with multiple criteria

    this works good. thank you.

    but how can i input using textboxes instead typing in M2, M3, M4, and M5.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    Sorry - I did not spot that you want VBA for this. That's not my thing - someone else may be able to help.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,728

    Re: Get column result with multiple criteria

    Be patient, please. Your duplicate thread has been closed.

+ 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. [SOLVED] Return result with multiple criteria
    By jlp83 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-19-2020, 09:00 AM
  2. excel formula, two criteria, 3rd column result
    By cjdstephenson in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-09-2015, 10:12 AM
  3. Every data result, multiple criteria
    By mariocubed in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-05-2014, 12:29 PM
  4. [SOLVED] Search for multiple rows from multiple sheets by criteria & show result in userform
    By ANDREAAS in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-07-2014, 11:29 AM
  5. Replies: 4
    Last Post: 03-18-2014, 11:50 AM
  6. [SOLVED] Multiple criteria and lists for one result
    By gyj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-15-2012, 01:46 AM
  7. Multiple Criteria in SumProduct, N/A Result
    By dcd123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-07-2005, 08:26 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