Give a sequence of columns, I want to sort each column individually using formula because of some reason.
Eg.
A | B | C | D |
---|---|---|---|
4 | 7 | 2 | 5 |
1 | 8 | 1 | 3 |
9 | 3 | 4 | |
7 | 4 |
Expected output
A | B | C | D |
---|---|---|---|
1 | 7 | 1 | 3 |
4 | 7 | 2 | 4 |
8 | 3 | 4 | |
9 | 5 |
Is there any way to do that with a formula? Also the formula should take the whole range as input like A1:D4. Any help is appreciated
Edit - My real problem is solving a trick question, it is not related to any real-world dataset. I saw this trick question answered on youtube here - link. While the solution is provided for a single cell and dragged for remaining cells, I wanted to implement it using ArrayFormula for the whole column so that I don't have to keep dragging it again.
I don't know if it is possible or not, or is it valid to solve questions like these in google sheets. Do tell if it's not appropriate in tools like sheets.