Google-sheets – Combine rows that have different values into one row for the specific value in column A

google sheets

I have a big list of items that unfortunately split the items into 2 rows but with differing values in different columns. Is there a way to combine them into 1 single row like this?

enter image description here

Any help much appreciated.

Best Answer

If there are never more than two rows with the same key value in column A, you can aggregate the data the way you describe with this formula in cell G1:

=query( 
  A1:E, 
  "select A, max(B), max(C), max(D), max(E) 
   where A is not null 
   group by A", 
  0 
)