Cobold
Cobold

Reputation: 2613

Google Sheets combine two sheets merging duplicates

I have two sheets with column 1 having different materials, but column 2 has their quantities. I need to combine both of the sheets, such as the duplicate material entries would be summed together. Is it possible to do in Google Sheets, possibly with the query function?

Upvotes: 1

Views: 115

Answers (1)

player0
player0

Reputation: 1

try it like this:

=ARRAYFORMULA(QUERY({Sheet1!A1:B; Sheet2!A1:B}, 
 "select Col1,sum(Col2) 
  where Col2 is not null 
  group by Col1 
  label sum(Col2)''", 0))

where column A = material and column B = quantity

Upvotes: 1

Related Questions