Forum Discussion

bpalmerau's avatar
bpalmerau
Copper Contributor
Nov 21, 2021
Solved

Help transposing one column and grouping by another at the same time?

I think I'm having trouble finding the answer to this because I don't know what to call it, but an example makes it clear. I want to turn this:

DateCode
5/06/2014A015826
5/06/2014A015827
5/06/2014A015830
5/06/2014A015831
5/06/2014A015832
5/06/2014A015833
16/06/2014A015760
16/06/2014A015834
16/06/2014A015854
16/06/2014A015855
16/06/2014A015857
16/06/2014A015858

Into this:

DateCode 1Code 2Code 3Code 4…
5/06/2014A015826A015827A015830A015831
16/06/2014A015760A015834A015854A015855

 

Can someone help me to describe what I'm trying to do?

Thanks.

  • bpalmerau 

    F2
    ="Code "&SEQUENCE(,MAX(COUNTIFS(tbl_Data[Date],E3#)))
    
    E3
    =UNIQUE(tbl_Data[Date])
    
    F3
    =TRANSPOSE(FILTER(tbl_Data[Code],tbl_Data[Date]=E3))

2 Replies

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    bpalmerau 

    F2
    ="Code "&SEQUENCE(,MAX(COUNTIFS(tbl_Data[Date],E3#)))
    
    E3
    =UNIQUE(tbl_Data[Date])
    
    F3
    =TRANSPOSE(FILTER(tbl_Data[Code],tbl_Data[Date]=E3))
    • bpalmerau's avatar
      bpalmerau
      Copper Contributor
      Once I worked out how to put in the correct arrays where you had 'tbl_Data[column]', this worked. Very much appreciated, thanks.

Resources