+ Reply to Thread
Results 1 to 3 of 3

MATCH with two columns: nested?

Hybrid View

  1. #1
    Registered User
    Join Date
    11-18-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    MATCH with two columns: nested?

    Hi All,

    I'm an excel noobie and in my opinion my first excel task seems pretty complicated. So here it goes.

    I have two columns of data. Timestamp and TagNames. Both have duplicate entries. There is a third column, Value.

    For each timestamp & tagname combination, there is a unique value.

    I want to be able to create a conditional search statement which takes Timestamp and TagName as input and gives me the Value that matches both conditions.

    I would immensely, greatly and all synonyms thereof appreciate your help!!!

    Thanks!
    Last edited by bagarwal; 11-18-2010 at 06:31 PM. Reason: Problem solved!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: MATCH with two columns: nested?

    If by value you mean numeric, then you can use SUMIFS()

    e.g.

    =SUMIFS(C:C,A:A,"X",B:B,"Y")

    this will look for an X in column A and a Y in column B in same row and give the value in the same row at column C...

    If you have more than one matching record, then it will sum the corresponding values.

    if the column to retrieve is text, it is a bit more complicated, but something like:

    =INDEX($C$1:$C$100,MATCH(1,INDEX(($A$1:$A$100="X")*($B$1:$B$100="Y"),0),0)

    you are recommended not to use whole column references with this one though, as it is more resource intensive.

    Another way would be to add a column that concatenates A&B column and then perform a simple index/match

    e.g. =INDEX(C:C,MATCH("X"&"Y",D:D,0)) where column D contains concatenated cells...

    Note: you can replace "X" and "Y" with cell references too.
    Last edited by NBVC; 11-18-2010 at 06:14 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-18-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: MATCH with two columns: nested?

    Thanks!!! That was really quick and exactly what I needed. My value is numeric, so SUMIFS solved the problem. I had been messing around with index and match for the past 3-4 hours but with no success.

    Thanks again!!

+ 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