google-sheetsformulassumifsgs-vlookup

Vlookup and SUM of duplicate values


I was working on a Google Spreadsheet, containing two sheets which are "Main" and "WIP".

WIP sheet contains all the raw Data that I need. While on the Main Sheet, I was trying to get the exact data from WIP sheet using Vlookup function. I used this working formula for that:

=IFERROR(VLOOKUP($A2,WIP!$A$1:$E$996,2,FALSE),"-")

My problem is, there is a duplicate product code on WIP sheet. What I need to do is get the sum of those and the total appear on the Main sheet.

The Value of product code B11HVYJK on the Main Sheet should be:

Available    Inbound
   51           9

Solution

  • You can use =SUM(FILTER(WIP!B:B,WIP!A:A=$A2))