I have this table in Google Sheets
Month 1 2 3 ...
1 20 30 45
2 32 47
3 53
...
How do I Transpose the last value of each columns into this?
Month lastValue
1 20
2 32
3 53
...
CodePudding user response:
Although I'm not sure whether I could correctly understand your question, in your situation, how about the following sample formula?
Sample formula:
=BYROW(B2:D,LAMBDA(x,IFERROR(INDEX(SPLIT(TEXTJOIN(",",TRUE,x),","),1))))
- In this formula, in order to start no empty cell, I used
TEXTJOIN
andSPLIT
. And, the 1st cell is retrieved. I used this withBYROW
.
Testing:
When this formula is used in your provided situation, the following result is obtained.