View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg Herbert Seidenberg is offline
external usenet poster
 
Posts: 1,180
Default Sorting by Row Number?

Assume just one row at A1 and locations with one letter and 3 digits.
Erase the equal sign in the formulas to get this:
J926 F832 E127 I200 D185 H572 J532 D692 A687 D362
Name these 10 cells data.
In another 10 cell location, enter this array formula:
="^="&CHAR(RIGHT(LARGE(VALUE(RIGHT(data,3)*100+
CODE(LEFT(data,1))),COLUMN()),2))&
LEFT(LARGE(VALUE(RIGHT(data,3)*100+
CODE(LEFT(data,1))),COLUMN()),3)
You should get this sorted row:
^=J926 ^=F832 ^=D692 ^=A687 ^=H572 ^=J532 ^=D362 ^=I200 ^=D185 ^=E127
Copy Paste Special Values
and erase the caret character.
If your address format is variable, I recommend using R1C1 Ref Style.
Change the formula accordingly.