Compare values in two columns and return the value from third

Solved/Closed
ramdubai Posts 2 Registration date Monday 11 March 2013 Status Member Last seen 11 March 2013 - 11 Mar 2013 à 01:34
 keshav - 7 Sep 2016 à 02:30
Hello,

I've a table containing four columns. If the values in the first two columns match to particular value (eg. A1="xxxx" and B1="yyy"), I need to return the value in the third column to the fourth column.
Can anybody help??? Thanks in advance.
Related:

4 responses

Kevin@Radstock Posts 42 Registration date Thursday 31 January 2013 Status Member Last seen 26 April 2014 9
11 Mar 2013 à 02:57
Hi ramdubai

Are the criteria values unique! If they are, try the following. assuming your data is in A1:C100 including column headers.

=LOOKUP(2,1/((A2:A1000=Value1)*(B2:B1000=Value2)),C2:C1000)

If there are multiple criteria which match, then try the array formula ("ctrl + shift + enter" to commit)

=IFERROR(INDEX($C$2:$C$1000,SMALL(IF(($A$2:$A$1000=Value1)*($B$2:$B$1000=Value2),ROW($2:$1000)-ROW($1:$1)),ROW($A1))),"")

Kevin
hey Kevin may I ask you something please?
I have a similar question please..
I have two columns A and B I want to match them, when they do match at a cell I want to return a value from a third column to a fourth column..the value needed from the third column is in the same row as the matched value in column B how can I do that please?