Excel Logic for Sorting

smalik

Board Regular
Joined
Oct 26, 2006
Messages
180
Office Version
  1. 365
Platform
  1. Windows
Can someone please help me understand the logic for Sorting in Excel?

I have a column with Policy ID with 12 characters. The last three characters are just the sequence so they are not necessary when I am looking for unique IDs. I use the left function to pull the first 9 characters in a different cells. So when I sort the two columns I get different results based on which column I am applying the sort criteria.

Here are my results:
1624628500403.png


This seems to me that Excel is looking at the characters from left to right when doing the sort. Is this a correct assumption? I am getting two different results.

Thoughts? Comments?

Thanks in advance.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
It's reading it as a string, so depending on the Ascii code for each character, yes it will affect the sort, but yes it's left to right, just like

Abnormal precedes Apple which would precede Apples which would precede Apple1 and then Apple11 or Apple1_2 or Apple22 if you sort in ascending order
 
Upvote 0
Solution

Forum statistics

Threads
1,215,584
Messages
6,125,674
Members
449,248
Latest member
wayneho98

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top