Search code examples
google-sheetsarray-formulastextjoin

Combining values ​based on conditions, using an Arrayformula | Google Sheets


What should a function that combines selected values ​​into one using an array function look like? I would like the function to combine Unique Nr if Id and data are the same.

https://docs.google.com/spreadsheets/d/1x1yR2oc2VxUFuijEq-bhLKGgHscnIzDVS0cguIslajk/edit?usp=sharing

enter image description here


Solution

  • try:

    =ARRAYFORMULA(REGEXREPLACE(TRIM(SPLIT(FLATTEN(
     QUERY(QUERY({A2:A&","\ B2:B&" "&C2:C&"♦"}; 
     "select max(Col1) 
      where Col1 <> ',' 
      group by Col1 
      pivot Col2");; 9^9)); "♦")); ",$"; ))
    

    enter image description here