ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sorting contents from right to left (https://www.excelbanter.com/excel-worksheet-functions/145631-sorting-contents-right-left.html)

Kim

sorting contents from right to left
 
Do you know of a way to sort contents of a column from right to left? They
are formatted as text fields, even though their contents are numbers but they
are not consistent lengths of numbers. Someone said I should change the
language to Arabic or something?
12345
347
5443
7654
12
3452

vezerid

sorting contents from right to left
 
It would have helped, you know, if you had also shown how you would
expect them to be sorted. I assume that you want 12345 to be sorted as
if it was 54321? If so, use the following formula next to your data
(assuming start from A2).

=SUMPRODUCT(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),
1)*10^(ROW(INDIRECT("1:"&LEN(A2)))-1))

Sort by this column.

HTH
Kostis Vezerides

On Jun 7, 3:31 pm, Kim wrote:
Do you know of a way to sort contents of a column from right to left? They
are formatted as text fields, even though their contents are numbers but they
are not consistent lengths of numbers. Someone said I should change the
language to Arabic or something?
12345
347
5443
7654
12
3452





All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com