简体   繁体   中英

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

I have a sheet A like this: 在此处输入图像描述

And I have Sheet B like this: 在此处输入图像描述

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

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

在此处输入图像描述

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))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM