Sorting Numerical Data - Decimals

  • Thread starter Thread starter Michael B.
  • Start date Start date
M

Michael B.

Excel sorts decimals in the following order:

..1
..163
..2
..3
..312
..4

Is there any way to treat the decimals as whole numbers in the sort, so that
the order would come out .1, .2, .3, .4, .163, .312?
 
Wrap the CStr() function around the field name. Put that in the Order By
clause of a SQL statement or put it in the field of a query and sort on it.
 
Michael

I'm not following the logic of the sort order you proposed.

Are you saying you want to treat the decimal values as if they were
integers, then sort numerically?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I misread your post and my solution probably won't work.

Is this for Access or Excel?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access stripping decimal places in query 1
Decimal Places 1
Decimal displays 1, 2, or None 2
decimals 6
Formatting decimal places 8
VBA- Excel Programming:- 0
Auto Increment recordset 4
Regular expression 5

Back
Top