Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Karl Burrows
 
Posts: n/a
Default Sort text Values in Numeric Order

I changed a field type in Access from Number to Text to allow 1a, 1b, etc.
and now when the data is imported into my Excel workbooks, the order is
still sorting as text (1, 10, 100, 101, 2, 20, etc.). Any thought son how
to get it to sort correctly now?

Thanks!


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Karl,

IN an adjacent column add this formula

=--A1

copy down and then sort by the helper column.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Karl Burrows" wrote in message
...
I changed a field type in Access from Number to Text to allow 1a, 1b, etc.
and now when the data is imported into my Excel workbooks, the order is
still sorting as text (1, 10, 100, 101, 2, 20, etc.). Any thought son how
to get it to sort correctly now?

Thanks!




  #3   Report Post  
Karl Burrows
 
Posts: n/a
Default

Anything that has a text value (1a, 1b, 1c), gives me a #VALUE error and it
still wants to sort as a text value. Any other suggestions?

Thanks!

"Bob Phillips" wrote in message
...
Karl,

IN an adjacent column add this formula

=--A1

copy down and then sort by the helper column.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Karl Burrows" wrote in message
...
I changed a field type in Access from Number to Text to allow 1a, 1b, etc.
and now when the data is imported into my Excel workbooks, the order is
still sorting as text (1, 10, 100, 101, 2, 20, etc.). Any thought son how
to get it to sort correctly now?

Thanks!





  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

If you separate your values into two helper cells--one for the numeric portion
and one for the text portion, you can sort your data based on those two helper
columns.

Depending on what your data looks like, you could use Data|Text to columns or
formulas to parse those values.

You may want to post a representative sample of what your data looks like.

Karl Burrows wrote:

Anything that has a text value (1a, 1b, 1c), gives me a #VALUE error and it
still wants to sort as a text value. Any other suggestions?

Thanks!

"Bob Phillips" wrote in message
...
Karl,

IN an adjacent column add this formula

=--A1

copy down and then sort by the helper column.

--

HTH

RP
(remove nothere from the email address if mailing direct)

"Karl Burrows" wrote in message
...
I changed a field type in Access from Number to Text to allow 1a, 1b, etc.
and now when the data is imported into my Excel workbooks, the order is
still sorting as text (1, 10, 100, 101, 2, 20, etc.). Any thought son how
to get it to sort correctly now?

Thanks!



--

Dave Peterson
  #5   Report Post  
Karl Burrows
 
Posts: n/a
Default

Here is what I ended up doing:

Added a function to my VBA module:
Function CellValue(c) As Double
CellValue = Val(c)
End FunctionThen created a column using =CellValue(A1) and copied down
for all the values in the column and then sorted by this row first, then the
original column of data.This seemed to work for what I wanted. Thanks for
your help!!!
"Dave Peterson" wrote in message
...
If you separate your values into two helper cells--one for the numeric
portion
and one for the text portion, you can sort your data based on those two
helper
columns.

Depending on what your data looks like, you could use Data|Text to columns
or
formulas to parse those values.

You may want to post a representative sample of what your data looks like.

Karl Burrows wrote:

Anything that has a text value (1a, 1b, 1c), gives me a #VALUE error and
it
still wants to sort as a text value. Any other suggestions?

Thanks!

"Bob Phillips" wrote in message
...
Karl,

IN an adjacent column add this formula

=--A1

copy down and then sort by the helper column.

--

HTH

RP
(remove nothere from the email address if mailing direct)

"Karl Burrows" wrote in message
...
I changed a field type in Access from Number to Text to allow 1a, 1b,
etc.
and now when the data is imported into my Excel workbooks, the order is
still sorting as text (1, 10, 100, 101, 2, 20, etc.). Any thought son
how
to get it to sort correctly now?

Thanks!



--

Dave Peterson


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
Assign numerical values to text codes Bridget Excel Worksheet Functions 3 April 18th 05 11:33 PM
Count how many different text values in an array. OVERLOAD Excel Worksheet Functions 3 April 14th 05 04:12 PM
Need to sort dates before 1900 in proper order sandage_2000 Excel Discussion (Misc queries) 3 January 8th 05 03:31 AM
Graph values in ascending order Ant [email protected] Excel Discussion (Misc queries) 1 January 6th 05 06:10 PM
text and values combined in one cel Bart Excel Discussion (Misc queries) 1 December 14th 04 08:36 AM


All times are GMT +1. The time now is 09:58 AM.

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"