JURY
JURY

Reputation: 25

Compare 2 columns in 2 different sheet and return 3rd value Vlookup

I have a sheet A like this: enter image description here

And I have Sheet B like this: enter image description here

Now I want to get the Result2 from sheet B and fill Sheet A result2 column by matching log & code

Sheet B Result2 =  Sheet A result2

How can I write the vlookup formula. Please help me.

Thank you

Upvotes: 0

Views: 382

Answers (1)

You can do this really easy with SUMIFS because you are trying to get a number:

enter image description here

Formula in cell D2 from Sheet A is:

=SUMIFS('Sheet B'!$C$2:$C$8;'Sheet B'!$A$2:$A$8;'Sheet A'!A2;'Sheet B'!$B$2:$B$8;'Sheet A'!B2)

Another option would be using an array formula (it must be introduced pressing CTRL+ENTER+SHIFT):

=INDEX('Sheet B'!$C$2:$C$8;MATCH(A2&B2;'Sheet B'!$A$2:$A$8&'Sheet B'!$B$2:$B$8;0))

Upvotes: 1

Related Questions