Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Concha94
 
Posts: n/a
Default Can I sort a column of #s Rt to left? in a worksheet

I have a series or land parcel IDs. They are vertical in a column. I want to
sort them from right to left digits in the cell instead of the usual Rt to
left.

Example: Row 1. 076 88 0013
Row 2 1104 87 2311
Row 3 232 443 3779
Row 4 1167 225 B991

I want to sort ,based on the last four digits in the cell in a
Decending/Ascending as needed.

Example Row 1. 1104 87 2311
Row 2 1167 225 B991
Row 3 076 88 0013
Row 4 232443 3779

Thanks any help would be appreciated
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary L Brown
 
Posts: n/a
Default Can I sort a column of #s Rt to left? in a worksheet

Use a 'cheat' column that gets the last digit(s),ie: right(C17,1), then sort
on that column.
You could also create a user-defined-function and put that in the 'cheat'
function.
Such as...
'/================================================== =========/
' Function Purpose: Reverse the order of characters in cell
'
Public Function ReverseMe(Select_Cell As Range) As String
Dim i As Integer
Dim strResult As String

Application.Volatile

On Error GoTo err_Function

If Len(Select_Cell.Value) < 0 Then
For i = Len(Select_Cell.Value) To 1 Step -1
strResult = strResult & Mid(Select_Cell.Value, i, 1)
Next i
End If

ReverseMe = strResult

exit_Function:
On Error Resume Next
Exit Function

err_Function:
Debug.Print "Error: " & Err.Number & " - (" & _
Err.Description & _
") - Function: ReverseMe - " & Now()
Resume exit_Function

End Function
'/================================================== =========/

For example, if cell B15 is 1a2b, the formula
=ReverseMe(B15)
would show b2a1.
I think that's what you want to sort on, right?

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Concha94" wrote:

I have a series or land parcel IDs. They are vertical in a column. I want to
sort them from right to left digits in the cell instead of the usual Rt to
left.

Example: Row 1. 076 88 0013
Row 2 1104 87 2311
Row 3 232 443 3779
Row 4 1167 225 B991

I want to sort ,based on the last four digits in the cell in a
Decending/Ascending as needed.

Example Row 1. 1104 87 2311
Row 2 1167 225 B991
Row 3 076 88 0013
Row 4 232443 3779

Thanks any help would be appreciated

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
Sort as "reference column" kingjeremy Excel Discussion (Misc queries) 2 October 10th 05 11:41 PM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM
grand total column B from every worksheet in workbook igor Excel Discussion (Misc queries) 2 February 23rd 05 08:42 PM


All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"