ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   decimal sorting (https://www.excelbanter.com/excel-discussion-misc-queries/92870-decimal-sorting.html)

Tamesh

decimal sorting
 
Hi,

I have a spreadsheet with an inventory list. The inventory items all have
number associated with them (i.e. 1900.04). However Some of the inventory
has multiple items associate with the same originating number (i.e.
1900.04-15). Is there a way to sort it so that all the similar numbers stay
together (i.e. 1900.04, 1900.05, 1900.04-15) without sending the hyphenated
values to the bottom of the list after 2000 for example.

Thanks.

Dave Peterson

decimal sorting
 
It sounds like 1900.04 is numeric and 1900.04-05 is text.

You could make sure that you entered all the items as text by preformatting the
column as Text or by entering your data with a leading apostrophe: '1900-04

Or you could use a helper column:

=""&a2

If you concatenate your 1900.04 number with the empty string, the result will be
a string.

Then you can drag that formula down and sort by that column.

Tamesh wrote:

Hi,

I have a spreadsheet with an inventory list. The inventory items all have
number associated with them (i.e. 1900.04). However Some of the inventory
has multiple items associate with the same originating number (i.e.
1900.04-15). Is there a way to sort it so that all the similar numbers stay
together (i.e. 1900.04, 1900.05, 1900.04-15) without sending the hyphenated
values to the bottom of the list after 2000 for example.

Thanks.


--

Dave Peterson

Tamesh

decimal sorting
 
hmm i'm afraid that neither one of those processes worked :-(. Below is a
snipped of my number set so you see what i'm trying to sort. Thanks.

1999.01
1999.02
1999.03
1999.04
1999.05
1999.06
1999.07
1999.19
1999.2
1999.21
1999.22
1999.23
2003.01
2003.02
2003.03
2003.04
2003.05
2003.06
2005.14
2005.15
1999.15.01-40
1999.28.01-06
1999.29.01-76
2003.17.01-02
2004.08.01-23
2004.12.01-02
2004.14.01-02
2004.16.a-b

Dave Peterson

decimal sorting
 
I put your data in A1:A28 and put this formula in B1:

=""&a1
and dragged down.

Then I selected my range and sorted by column B.

I ended up with data in this order:

Column A---- Column B------
1999.01 1999.01
1999.02 1999.02
1999.03 1999.03
1999.04 1999.04
1999.05 1999.05
1999.06 1999.06
1999.07 1999.07
1999.15.01-40 1999.15.01-40
1999.19 1999.19
1999.2 1999.2
1999.21 1999.21
1999.22 1999.22
1999.23 1999.23
1999.28.01-06 1999.28.01-06
1999.29.01-76 1999.29.01-76
2003.01 2003.01
2003.02 2003.02
2003.03 2003.03
2003.04 2003.04
2003.05 2003.05
2003.06 2003.06
2003.17.01-02 2003.17.01-02
2004.08.01-23 2004.08.01-23
2004.12.01-02 2004.12.01-02
2004.14.01-02 2004.14.01-02
2004.16.a-b 2004.16.a-b
2005.14 2005.14
2005.15 2005.15


It looked in order to me.



Tamesh wrote:

hmm i'm afraid that neither one of those processes worked :-(. Below is a
snipped of my number set so you see what i'm trying to sort. Thanks.

1999.01
1999.02
1999.03
1999.04
1999.05
1999.06
1999.07
1999.19
1999.2
1999.21
1999.22
1999.23
2003.01
2003.02
2003.03
2003.04
2003.05
2003.06
2005.14
2005.15
1999.15.01-40
1999.28.01-06
1999.29.01-76
2003.17.01-02
2004.08.01-23
2004.12.01-02
2004.14.01-02
2004.16.a-b


--

Dave Peterson


All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com