Dec 16 2020 07:45 AM
I´ve got a tabel with data. First column in the row contains a post of data (Name), the same data can occure a varying number of times. I´ve then got a set of data in the following columns - for example Groupe, number...
I ned to "transpose" thhe data so that the first column contains every uniqu value in the first column (Name). For every row in the first table, with the sama Name, I need to stack the values in a new column.
I do not want the same Group data in the same column. Group:AAA can be in column 2 for Name 1, and in column 7 in Name 3.
I have 50 persons selling about 150 different products. About 1-8 products per day.
I wan´t to be able to create 1 row per person, with the columns representing what has been sold. In my example below every other column describes what they´ve sold, and ervery other how many of each. I do NOT want a sheet with a column for each products.
First table:
Name | Group | Numb |
Name 1 | AAA | 12 |
Name 1 | BBB | 23 |
Name 1 | DDD | 34 |
Name 2 | EEE | 456 |
Name 3 | BBB | 23 |
Name 3 | CCC | 45 |
Name 3 | FFF | 576 |
Name 3 | AAA | 34 |
Name 4 | SSS | 56 |
New table:
Name 1 | AAA | 12 | BBB | 23 | DDD | 34 | ||
Name 2 | EEE | 456 | ||||||
Name 3 | BBB | 23 | CCC | 45 | FFF | 576 | AAA | 34 |
Name 4 | SSS | 56 |
Dec 16 2020 07:57 AM - edited Dec 16 2020 08:00 AM
@FredrikWickstroem I respect your wish to create the output as in the "New table:", but perhaps you can live with a Pivot Table in stead. Super easy with the added benefit that you also see how many items were sold of each product. See attached.
Edit: Sorry, I now see you DO NOT want products in one column!!
Dec 16 2020 08:42 AM - edited Dec 16 2020 08:47 AM
Create a list of Unique names, starting in G1
=UNIQUE(FILTER(A:A,A:A<>""))
Then put this formula in H1 and copy down manually
=TRANSPOSE(INDEX(FILTER(B:C,A:A=G1,""),QUOTIENT(SEQUENCE(COUNTIF(A:A,G1)*2,,0),2)+1,MOD(SEQUENCE(COUNTIF(A:A,G1)*2)-1,2)+1))
I don't know way you cant use G1# or the Unique-formula instead of G1. But it's easy to copy it manually.
Swed:
Om du vill slippa översätta
=UNIK(FILTER(A:A;A:A<>""))
=TRANSPONERA(INDEX(FILTER(B:C;A:A=G1;"");KVOT(SEKVENS(ANTAL.OM(A:A;G1)*2;;0);2)+1;REST(SEKVENS(ANTAL.OM(A:A;G1)*2)-1;2)+1))