Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Can't figure out a certain column sort

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the column to
sort with the 148(a) where it should be... after the 128 and before the 256?
I can't remove the parenthesis as it is part of the data.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can't figure out a certain column sort

Can you insert a couple of helper cells and put formulas in them to extract the
numbers?

Then sort the entire range based on those two columns?

If you can, then is that the only kind of non-numeric in your data?

Brendan wrote:

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the column to
sort with the 148(a) where it should be... after the 128 and before the 256?
I can't remove the parenthesis as it is part of the data.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Can't figure out a certain column sort

I could possbily do a "text to column" but there are some codes that are like
245(a)(1) and 273a(a)(1). All of the problem data either ends with the
parenthesis or a letter.

"Dave Peterson" wrote:

Can you insert a couple of helper cells and put formulas in them to extract the
numbers?

Then sort the entire range based on those two columns?

If you can, then is that the only kind of non-numeric in your data?

Brendan wrote:

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the column to
sort with the 148(a) where it should be... after the 128 and before the 256?
I can't remove the parenthesis as it is part of the data.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can't figure out a certain column sort

If you don't care about what the extra characters are, you can use an array
formula like:

=IF(ISNUMBER(A1),A1,
--LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Or with that formula in B1, you could use this in C1 to get that extra info:
=MID(A1,LEN(B1)+1,255)



Brendan wrote:

I could possbily do a "text to column" but there are some codes that are like
245(a)(1) and 273a(a)(1). All of the problem data either ends with the
parenthesis or a letter.

"Dave Peterson" wrote:

Can you insert a couple of helper cells and put formulas in them to extract the
numbers?

Then sort the entire range based on those two columns?

If you can, then is that the only kind of non-numeric in your data?

Brendan wrote:

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the column to
sort with the 148(a) where it should be... after the 128 and before the 256?
I can't remove the parenthesis as it is part of the data.


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Can't figure out a certain column sort

I do care what the extra characters are because in the long run, I need to
wrap them back up as they originally were. I just need to strip them for the
initial sorting purposes.

"Dave Peterson" wrote:

If you don't care about what the extra characters are, you can use an array
formula like:

=IF(ISNUMBER(A1),A1,
--LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Or with that formula in B1, you could use this in C1 to get that extra info:
=MID(A1,LEN(B1)+1,255)



Brendan wrote:

I could possbily do a "text to column" but there are some codes that are like
245(a)(1) and 273a(a)(1). All of the problem data either ends with the
parenthesis or a letter.

"Dave Peterson" wrote:

Can you insert a couple of helper cells and put formulas in them to extract the
numbers?

Then sort the entire range based on those two columns?

If you can, then is that the only kind of non-numeric in your data?

Brendan wrote:

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the column to
sort with the 148(a) where it should be... after the 128 and before the 256?
I can't remove the parenthesis as it is part of the data.

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default Can't figure out a certain column sort

Hi Brendan,

If all of your data is like your example with 3 numbers first, then
a helper column with =LEFT(A1,3) and dragged down to
the end of your data is all that is needed, simply sort on the helper
column and delete it when finished.

If that is not the case then post back showing all of the variations
in your data.

HTH
Martin


"Brendan" wrote in message
...
I do care what the extra characters are because in the long run, I need to
wrap them back up as they originally were. I just need to strip them for
the
initial sorting purposes.

"Dave Peterson" wrote:

If you don't care about what the extra characters are, you can use an
array
formula like:

=IF(ISNUMBER(A1),A1,
--LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you
do it
correctly, excel will wrap curly brackets {} around your formula. (don't
type
them yourself.)

Or with that formula in B1, you could use this in C1 to get that extra
info:
=MID(A1,LEN(B1)+1,255)



Brendan wrote:

I could possbily do a "text to column" but there are some codes that
are like
245(a)(1) and 273a(a)(1). All of the problem data either ends with the
parenthesis or a letter.

"Dave Peterson" wrote:

Can you insert a couple of helper cells and put formulas in them to
extract the
numbers?

Then sort the entire range based on those two columns?

If you can, then is that the only kind of non-numeric in your data?

Brendan wrote:

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but
everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the
column to
sort with the 148(a) where it should be... after the 128 and before
the 256?
I can't remove the parenthesis as it is part of the data.

--

Dave Peterson


--

Dave Peterson



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can't figure out a certain column sort

You can also use the second suggestion to retrieve the rest of the characters.

Did it not work for you?

Brendan wrote:

I do care what the extra characters are because in the long run, I need to
wrap them back up as they originally were. I just need to strip them for the
initial sorting purposes.

"Dave Peterson" wrote:

If you don't care about what the extra characters are, you can use an array
formula like:

=IF(ISNUMBER(A1),A1,
--LEFT(A1,MATCH(FALSE,ISNUMBER(-MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)),0)-1))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Or with that formula in B1, you could use this in C1 to get that extra info:
=MID(A1,LEN(B1)+1,255)



Brendan wrote:

I could possbily do a "text to column" but there are some codes that are like
245(a)(1) and 273a(a)(1). All of the problem data either ends with the
parenthesis or a letter.

"Dave Peterson" wrote:

Can you insert a couple of helper cells and put formulas in them to extract the
numbers?

Then sort the entire range based on those two columns?

If you can, then is that the only kind of non-numeric in your data?

Brendan wrote:

I have the following in a colum:

256
128
148(a)
299
301

The I would like the order to end up with a numeric sort but everytime I try
it, the 148(a) ends up at the bottom. Is there a way to get the column to
sort with the 148(a) where it should be... after the 128 and before the 256?
I can't remove the parenthesis as it is part of the data.

--

Dave Peterson


--

Dave Peterson


--

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
data, sort option is grayed. how to sort on a column? Steve Richter Excel Discussion (Misc queries) 1 September 25th 07 03:25 PM
column is added up by original figure not after rounding up Gwen New Users to Excel 1 October 5th 06 09:23 PM
my column is sorted in two sections. How do I sort entire column? Bob Umlas, Excel MVP Excel Discussion (Misc queries) 0 February 13th 06 08:41 PM
How can I sort one column and have the entire row sort. (binding) Blue Excel Worksheet Functions 10 November 13th 05 07:09 PM
1-7 Columns, to find last column with figure in sonar Excel Worksheet Functions 3 September 1st 05 06:04 AM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"