+ Reply to Thread
Results 1 to 5 of 5

Criteria based on multiple columns

  1. #1
    Registered User
    Join Date
    01-05-2009
    Location
    Southern Pines, NC
    MS-Off Ver
    Excel 2007
    Posts
    95

    Exclamation Criteria based on multiple columns

    I have a file in which I need to return a value based on a logic test of values in two columns. Can anyone please help me with this. While I am unable to upload the actual file I am working on for confidential reasons, but I have recreated a very simple file that if I could get a formula that will return the proper value in Column J of the attached based on Value 1 and Value 2, this would solve my problem. Hopefully this will be very easy for some of you experts, but over my head. I am on a tight deadline and some help would be greatly appreciated.

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Criteria based on multiple columns

    Hi,

    In J2 use

    =SUMPRODUCT(--($A$2:$A$16=H2),--($B$2:$B$16=I2),$C$2:$C$16)

    copy down.

  3. #3
    Registered User
    Join Date
    01-05-2009
    Location
    Southern Pines, NC
    MS-Off Ver
    Excel 2007
    Posts
    95

    Re: Criteria based on multiple columns

    This worked perfect for what I asked, but I guess I asked a bad question. The value I am trying to return is actually text, the formula provided is returning a zero. Can you take a look at the new attached file? This may be a more accurate question. Thanks

  4. #4
    Registered User
    Join Date
    01-05-2009
    Location
    Southern Pines, NC
    MS-Off Ver
    Excel 2007
    Posts
    95

    Re: Criteria based on multiple columns

    I didn't hit upload. Here is the file.
    Attached Files Attached Files

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Criteria based on multiple columns

    OK, then. It often pays to describe the requirements completely up front, especially if text and/or numbers are involved.

    For this scenario put into J2 and copy down

    =INDEX($A$2:$C$16,MATCH(H2&I2,$A$2:$A$16&$B$2:$B$16,0),3)

    Note that this is an array formula and must be confirmed with CTRL+SHIFT+ENTER, otherwise it won't work.

    cheers

+ 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