sort text numbers ascending

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
672
Office Version
  1. 365
Platform
  1. Windows
hi
thousands of check numbers and direct deposits and quickbooks
i mergedall the various statements together via PQ
since they are not all numbers some say DD or QB i turned check number column into text
problem happens when i sort
i get 1, 100, 1000, 10000 then the 2's
this makes it impossible to find any checks
is there a way to "fool" the text and have it sort as a number?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Why not make them real numbers ?
Enter 0 somewhere and copy
Select the entire number range - Copy - Paste special - Add
 
Upvote 0
i cant make them real numbers as the ones that have QB or DD or any other letters fail in PQ as they are not numbers
 
Upvote 0
hi has anyone come up with a solution to help me?
 
Upvote 0
is there a way to "fool" the text and have it sort as a number?
When you do the sorting, don't Excel ask you something like, 'Sort anything that looks like a number, as a number' ?

Another way is to have a separate helper column with a formula like:
Book1.xlsm
AB
11029000001029
21360000001360
31557000001557
41588000001588
52241000002241
62383000002383
72442000002442
82579000002579
93072000003072
103206000003206
113406000003406
12376000000376
133939000003939
144288000004288
154944000004944
16846000000846
17871000000871
18925000000925
19DDDD
20QBQB
Sheet4
Cell Formulas
RangeFormula
B1:B20B1=TEXT(A1,"000000000")


Then, sort on column B:
Book1.xlsm
AB
1376000000376
2846000000846
3871000000871
4925000000925
51029000001029
61360000001360
71557000001557
81588000001588
92241000002241
102383000002383
112442000002442
122579000002579
133072000003072
143206000003206
153406000003406
163939000003939
174288000004288
184944000004944
19DDDD
20QBQB
Sheet4
Cell Formulas
RangeFormula
B1:B20B1=TEXT(A1,"000000000")
 
Upvote 0
When you do the sorting, don't Excel ask you something like, 'Sort anything that looks like a number, as a number' ?

Another way is to have a separate helper column with a formula like:
Book1.xlsm
AB
11029000001029
21360000001360
31557000001557
41588000001588
52241000002241
62383000002383
72442000002442
82579000002579
93072000003072
103206000003206
113406000003406
12376000000376
133939000003939
144288000004288
154944000004944
16846000000846
17871000000871
18925000000925
19DDDD
20QBQB
Sheet4
Cell Formulas
RangeFormula
B1:B20B1=TEXT(A1,"000000000")


Then, sort on column B:
Book1.xlsm
AB
1376000000376
2846000000846
3871000000871
4925000000925
51029000001029
61360000001360
71557000001557
81588000001588
92241000002241
102383000002383
112442000002442
122579000002579
133072000003072
143206000003206
153406000003406
163939000003939
174288000004288
184944000004944
19DDDD
20QBQB
Sheet4
Cell Formulas
RangeFormula
B1:B20B1=TEXT(A1,"000000000")
please explain?
excel doesnt ask me anything
 
Upvote 0
Try using Data -> Sort, instead of the smaller quick icons 'Sort A to Z' or 'Sort Z to A'. Excel gives me a warning when I use Data->Sort on numbers stored as text.

If it still doesn't work then try the formula way on my previous post.
 
Upvote 0
wow thank you!
i didnt realise i should use the sort on home tab
then it asked sort if it looks like number as number
now everyhting is sorted correctly

can i add this to a macroupon activating the sheet?
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,849
Members
449,194
Latest member
HellScout

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