How do I sort hexidecimal numbers in an excel spreadsheet?

J

Jane Martin

When I attempt to sort hex numbers in a spreadsheet I get incorrect results.
The cells are formatted as text (else the leading 0 would be dropped). I
would like sort results to run from 0000 - ffff. any ideas?
 
M

Mike

First run a sort. Then create a second sorting column and stick an X where
it is numbers and leave it blank when you have letters. Or vice versa.

I think you have some cells stored as a number. Force them to text. Run a
sort and choose "Sort numbers and numbers stored as text separately".
 
D

Dave Peterson

When I ran a sort on those kinds of strings, the data was sorted ok.

But if you're having trouble, you could use a helper column and a formula:

=hex2dec(a1)
and drag down

Then sort your data based on this key.

====
I did format all the cells as text--including those that looked like:
1234 (4 numbers)
 

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

Top