Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to rearrange a 4 digit number contained in a single cell in large to small format

$
0
0

I have been using excel to convert a 4 digit number in a cell and rearrange the digits in large to small manner using a formula as in the pic.

For example 2439 is in cell E5, when applied this formula, LARGE(--MID(E5,{1,2,3,4},1),@{1,2,3,4})&LARGE(--MID(E5,{1,2,3,4},1),@{2,3,4})&LARGE(--MID(E5,{1,2,3,4},1),@{3,4})&LARGE(--MID(E5,{1,2,3,4},1),@{4}), returns 9432. As you can see 9,4,3,2 is arranged large to small.

How can I do the same in Google Sheets? please advise. Thanks

enter image description here


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>