Search code examples
google-sheets

Google Sheets can view table as other way?


Have anyway can the table I convert to table II view? Like the image.

enter image description here


Solution

  • To get that exact result, you can use:

    =ARRAYFORMULA(
       LET(unpv,SPLIT(TOCOL(A3:A5&"|"&B2:D2&"|"&B3:D5),"|"),
           fc,INDEX(unpv,,1),
           rws,SEQUENCE(ROWS(fc)),
           {IF(COUNTIFS(fc,fc,rws,"<="&rws)>1,,fc),CHOOSECOLS(unpv,2,3)}))
    

    However, you may be interested in this as well:

    =ARRAYFORMULA(SPLIT(TOCOL(A3:A5&"|"&B2:D2&"|"&B3:D5),"|"))