I am needing to transpose only a few columns (ex: C:G) into a single column, while maintaining the information in Column A and B. So if Joe made a sale on Monday Then "Monday" would be in the new Day Column. Then the next row would have Joe again, but this time "Wednesday" in the Day Column. Then, if there are no more values, then move to Steve and do the same thing. I have been stuck on this for a very long time so any advice or new approaches to this would be greatly appreciated. I don't care if it's with a formula or VBA code.
| | A | B | C | D | E | F | G |
+---+-------+-------+--------+---------+-----------+----------+--------+
| 1 | Names | Sales | Monday | Tuesday | Wednesday | Thurday | Friday |
| 2 | Joe | 24500 | Monday | | Wednesday | | |
| 3 | Steve | 15454 | | Tuesday | | | |
| 4 | Emily | 58421 | | Tuesday | Wednesday | Thursday | |
| 5 | Marie | 24582 | Monday | | | | Friday |
+---+-------+-------+--------+---------+-----------+----------+--------+
+---+-------+-------+-----------+
| | A | B | C |
+---+-------+-------+-----------+
| 1 | Names | Sales | Day |
| 2 | Joe | 24500 | Monday |
| 3 | Joe | 24500 | Wednesday |
| 4 | Steve | 15454 | Tuesday |
| 5 | Emily | 58421 | Tuesday |
| 6 | Emily | 58421 | Wednesday |
| 7 | Emily | 58421 | Thursday |
| 8 | Marie | 24582 | Monday |
| 9 | Marie | 24582 | Friday |
+---+-------+-------+-----------+
Wanted to test the new LET()
function.
If one has LET()
in Office 365 (as of this writing only available to certain insiders)
Put this in the first cell of the output and Excel will spill the results:
=LET(RNG_1,A2:INDEX(A:A,MATCH("zzz",A:A)),RNG_2,B2:INDEX(B:B,MATCH("zzz",A:A)),RNG_3,C2:INDEX(G:G,MATCH("zzz",A:A)),RW,ROWS(RNG_3),CLM,COLUMNS(RNG_3),SEQ,SEQUENCE(RW*CLM,,0),TOT,CHOOSE({1,2,3},INDEX(RNG_1,INT(SEQ/CLM)+1),INDEX(RNG_2,INT(SEQ/CLM)+1),INDEX(RNG_3,INT(SEQ/CLM)+1,MOD(SEQ,CLM)+1)&""),FILTER(TOT,INDEX(TOT,0,3)<>""))