# Sorting A Table By Numbers

Oct 15, 2008

I have managed to produce a table which uses formulas to calculate the amount of 'points' someone/a team has accumulated over a period of time however it seems that for some reason or another I cannot sort the table into order of 'who has the most points'

PosPlayerPlayedWonDrawLostPoints
1stDean120939
2ndJaymo1239018
3rdMacca1229115
4thRoss1219212

above is the final standings but as you can see the 'sort' function isnt working, and if i do any other sort the name of the person and the points no longer correspond... i.e. it ends up putting the names in alphabetical order and leaving all other columns as they currently are, or it changes the points column, leaving the names in the same place...

## Sorting Numbers Like 1.2.2.3, 12.4.2.3 Etc

Aug 26, 2009

I should sort numbers in ascending order from left to right, but the numbers sort only from right to left.

This is what I want:

1.3.2.2
1.4.1
2.1.1.1.1
3.2.3.12
3.3.1

And this is how it goes:

2.1.1.1.1
3.3.1
1.4.1
1.3.2.2
3.2.3.12

There are also numbers that have letter at the end (1.2.3a), and the cell format is text.

## Sorting The Numbers

Feb 25, 2009

I have three columns that are added together. Depending on where I need them to go, I need three options. For example, E6,E7,&E8 are added up, on E9, I need to be able to direct it to "A @ E10", "B @ E11", or "C @ E12"

## Sorting A Range Of Numbers?

May 28, 2014

I'm attempting to create a formula that'll sort a range of numbers and then return the corresponding values based on a specific place within the sorted range.

In this case, I'd like the following numbers sorted smallest to largest:

15, 9, 11, 19, 22, 17, 24, 19, 17, 24

The result would return something like:

9, 11, 15, 17, 17, 19, 19, 22, 24, 24

Then I'd like it to return the value based off of the formula in cell U13 & U14. In this case, it'd return the value in the 2nd and the 9th position (bolded above). I tried to use INDEX(), but it's returning the values in the unsorted list. I'd like it to return values from a sorted list. Also, I'm trying to solve this using a formula (not Sort & Filter) or VBA.

## Sorting Numbers With Text

Nov 13, 2008

I have a list of 2,000 plus numbers and the list contains numbers and text. When I sort or filter, the only option is sort A to Z (or Z to A), but the result is all of the numbers are sorted, then the numbers with letters are sorted. How can I sort both? I attached a excel example of what I am looking for.

## Sorting Numbers With #div/0! In Column

Oct 20, 2009

I have some numbers in a column which due to other cells not yet being filled in are returning a supressed #div/0! error. This is fine, but when i go to sort the column it puts them in the wrong order. I would like to record a macro, and assign it to the column header in order to sort the column.

## Numbers Not Sorting Correctly

Jul 31, 2013

I have three columns expressing death dates (date, month, year). The months and dates are finally sorting correctly within the same year, but I have it set to sort by year first.

The column starts off fine with 1860, goes up to 2013, then starts back at 1884 and goes back up to 2009. I can't find any difference between the two groups: there are some of the same years represented, there are blank month and date cells in both. I have a worksheet with birth dates that sorted fine; the only difference I can find is that birth dates only go up to 1997, but the column is formatted as General, so the turn of the century shouldn't be a problem.

I've tried highlighting the whole thing before sorting as well as selecting one cell as usual. I've also tried formatting the column as Text. I can't think of anything else.

## Sorting Repeat Numbers

Apr 14, 2008

I'm trying to develop this formula for days now.
how can I not list repeated nums from a array example:

675 863 765 982 856

no repeat nums: 675, 863, 982, 856

as 765 was repeat of 675 it should not be used.
keep in mind same goes of 3-4-5... repeats,

## Sorting Accoiunt Numbers

Nov 15, 2006

I have a spreadsheet with three Columns. Column A contains Account numbers that are both Numeric & AlphaNumeric for eg 3000, 3001A, 4001, 4501D.

I need VBA code that will forst sort the Numeric accounts 3000, 3001, 3002 etc and then then AlphaNumeric Codes 3001A, 3002B, 4501D etc

## Sorting Text Numbers

Dec 15, 2006

I have numbers like this and their sorting wrong. I want to sort in decending order by last digit to the right.

How it's sorting now: (sorting by first number sequence)

12/31/05a
12/31/05
11/01/06
10/31/06

I would like it to sort like this:

11/01/06
10/31/06
12/31/05a
12/31/05

These WERE text numbers that were formulated to read like dates. Is there any way to munipulate how to sort? I'm just looking to sort it like it was a date. I get text files in formats like this:

09062006 and I formulated them to read 09/06/06 like it would be a date.

## Sorting Mixed Text And Numbers?

Jun 17, 2014

A column holds numbers and numbers with suffixes. The conventional sort function pushes the text values to the bottom. I need them sorted along with the numbers.

Microsoft's KB says to add a column formatted as text and then to RETYPE ALL OF THE VALUES! Splendid. But my file has hundreds of records. Re-typing all of them would be a major pain. On the other hand, if I had started typing while trying to find a way to sort the darn thing I might be done by now.

Here's what I know so far: If we create a column, format it as text and then populate with 1, 2, 3, 4, 1a, 2a, 3a, 4a, etc. it will sort exactly correct (1, 1a, 2, 2a...) after selecting the "sort numbers and numbers stored as text separately" when the Sort Warning appears. If you try to create the sample I typed here, you need to be careful that the area is formatted as text BEFORE entering the text. You apparently cannot change the format of an existing column of data to Text or if you do it does not have the desired effect when sorting. It might be useful to know if this can be done too. MS suggests not.

## Sorting Names By Other Column Of Numbers

Aug 3, 2014

I've question in sorting: I've 2 column in one datasheet. one contain value of numbers and the other contain names of employes. i want to sort the name of the emplyes by the values that is on the first column.

Anther question is how to make it dynamically so ill not sorting it every time that the values of the first column is changing.

## Sorting Numbers From Smallest To Largest?

May 10, 2013

There must be something I'm doing wrong, because I have a list of numbers and when I select Data --> Sort --> Column G, I am not given the option of sorting "From smallest to largest". Only from "A to Z" or viceversa.

## Sorting List Of Numbers - Some Are Larger Than Others

Jun 7, 2013

I'm having some problems sorting a list of numbers that some are larger than others, but it would sort it by how large the number is in regards to 123 or 45... 45 would go first instead of 123... I tried to change the column to numbers but it still won't work. as well as in the custom sort section. I'll try to upload a sample...

## Sorting Numbers Of Varying Lengths

Aug 15, 2012

I am trying to do a VLOOKUP using a list based on our Part numbers in Excel 2007. When I do a normal sort it groups the numbers 1 thru 9 by the number of digits, giving me multiple list of 1 thru 9. When I do my lookup it will not find the shorter numbers. Is there some way to sort these Part numbers in order regardless of the number of digits?

## Updating / Sorting Numbers By (Newness)

May 26, 2014

I currently have a six column table that I would like to:

1. Take in an input in the form of a number and a letter in two separate columns. (Most Recent and Second Most Recent are purely output)

2. Sort the inputs from most recent to least recent - only store the most recent two.

3. An update only occurs if Current differs from Most Recent i.e. no repeat values.

Example:

Begin with a six column table (E/O stands for even or odd).

Current
E/O
Most Recent
E/O
Second Most Recent
E/O

[code]....

Place a number/letter in the current section - which most recent also takes the value of.

Current
E/O
Most Recent
E/O
Second Most Recent
E/O

[code]....

Update the value of current - this moves 10/E to the Second Most Recent entry and replaces Most Recent with the new value.

Current
E/O
Most Recent
E/O
Second Most Recent
E/O

[code]....

Update the value once more - understand the process.

Current
E/O
Most Recent
E/O
Second Most Recent
E/O

[code]....

I tried this with IF statements but the circular referencing makes this seem approach seem difficult.

## Sorting Alphanumeric Part Numbers

Jan 7, 2007

I have a fairly large list (1200 rows) of part numbers that I would like to sort. The part number has text and numbers, with a number in the middle. I need excel to ignore this middle number when sorting (but not any of the other numbers). Excel currently sorts like this:

MKDSN 1,5/ 3
MKDSN 1,5/ 3-5,08
MKDSN 1,5/ 4
MKDSN 1,5/14-5,08

when I want it to sort like this:

MKDSN 1,5/ 3
MKDSN 1,5/ 4
MKDSN 1,5/ 3-5,08
MKDSN 1,5/14-5,08

The first few letters in the part number or the numbers at the end aren't consistant. But it's always the numbers after the "/" and before the "-" (where there is one) that I want to ignore.

At the very least I would I need the list in alphabetical order. I don't need the list to be sorted by the "ignored number" at all. Meaning, I would be happy with this result:

MKDSN 1,5/ 3
MKDSN 1,5/ 4
MKDSN 1,5/ 2
MKDSN 1,5/14-5,08
MKDSN 1,5/ 3-5,08
MKKDS 2/24
MKKDS 2/20-3,5
MKKDS 2/ 2-3,5

I don't mind getting rid of "/" or spaces or "," in the part number, but I would prefer to not split the part number between two columns.

I tried creating a custom list, but there are just too many varieties to list them all.

## Sorting Negative And Positive Numbers

Mar 2, 2009

Need to sort the following in excel:

(2,000.000)(1,000.000)(500.000)(200.000)200.000 500.000 1,000.000 2,000.000

to the following:
2,000.000 (2,000.000)1,000.000 (1,000.000)500.000 (500.000)200.000 (200.000)

How can I sort like this.

## Sorting Data In A Table Using VBA

Aug 14, 2012

I am trying to create a macro where users can rearange data in a table. I used the macro recorder to sort the data in colmn C in descending order and this is the code that I got:

VB:

ActiveWorkbook.Worksheets("By Client").Sort.SortFields.Clear
"C3:C176"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("By Client").Sort

[Code]...

This works for the table as it is but the range may change as more rows are added to the table. I want it to start at row three as the first two rows are headers but in future tables the bottom row may not be 176. I dont want to include all rows as row 177 contains totals that I dont want to be included in the sort. what I should put as the range so that this macro will work regardless of how many rows are in the table?

## Sorting A Table By Date In VBA

May 23, 2014

I am trying to sort by date in a table (It is named Linked_file_table), C173:I188. I would like the table to be sorted by I173 AZ.

## Pivot Table Sorting

Jun 9, 2009

I've just come across Excel doing seemingly doing something really rather daft - though it equally could be me. I've grouped dates in a pivot table to 7 days at a time to group weeks, but when I then sort by date order it sorts by all those ranges starting with a 1st of the month, followed by all the 2nd's, etc.

## Sorting A Preformatted Table?

Jul 30, 2013

Trying to format a pre-formated table. Would like to have all records for each item on one line so to be able to create a regular table and then a pivot table from it.

Pre-formatted table is attached as Samplesort1.xls.

I do not have SQL.

Is it possible to do this without macros?

## Sorting Items In A Table

Nov 24, 2008

I've got this table that I want to sort. I've got it formatted as a table in Excel 07.

ABDescription
11Sunbake
24Make Sandcastle
35Apply Sunscreen
46Sip Coconut Mocktail
52Play with kids
66Seashells
72Starfish
83Swim
91Snorkel
2Surf
3Boogieboarding
4Eat Icecream
1Play beach volleyball

I'd like to sort the table where all the 1's are together and in line with column A ie......

## Dynamic Sorting In Table

Jul 10, 2009

Is it possible to have dynamic sorting in a table?

What I am after is a scoreboard type effect where as results are entered, the teams are sorted automatically, rather than entering all of the details and then doing a sort afterwards.

I have attached a table where I would like the sorting of columns B - E done in the following order (All decreasing order):

Comp Points first
then by Sets %
then by Points %

I am drawing this info from another table. Will this have an effect on if it can be sorted dynamically? Hoping that as i enter a result in the other table, it will bring across the current comp points, set % and points %, and then sort the table into the rankings all at once.

## Sorting In Pivot Table

Jan 11, 2008

I have created a pivot table that contains the following data:

Country Name
Date as in 5/1/08, 6/1/08, etc
With counts in the cells

I can sort on Country name and get an alphabethical list by country name showing teh numbers for each date

However I want to sort by the largest to smallest number that shows in the date column 01/01/08

Is there a way to sort on that colum-while moveing all the numbers in the other date columns along with it?

## Randomly Sorting List Of Numbers Into Different Permutations

Mar 1, 2014

with this problem (which I've been trying for weeks to solve).

I have a column ("C") of 640 numbers, which I need to randomly sort and place into the adjoining (ten thousand) columns. I then need to correlate each of these 10k columns with column "B".

The problem I have with the attached (which works for small numbers), is that when I increase the table size to 640 rows and anything more than a dozen or so columns, it takes forever to calculate and Excel often crashes.

random ver 1.04 280214.xlsx

## Sorting Mixed Content - Numbers And Words

Mar 28, 2014

I have a worksheet with a row of mixed cells near the top. By "mixed", I mean some cells have only numeric data (numeric-cells) and some have only words (word-cells).

GOAL: I want to sort the columns to the following order:

First all the columns with only numeric-cells in the mixed row, with those columns sorted in DESCENDING numeric order of the numeric-cells in the mixed row; followed by the columns with only word-cells in the mixed row sorted by ASCENDING alphabetic order.

So far all I have been able to accomplish is:

First all the columns with only numeric-cells in the mixed row, with those columns sorted in ASCENDING numeric order of the numeric-cells in the mixed row; followed by the columns with only word-cells in the mixed row sorted by ASCENDING alphabetic order. This was accomplished by a simple sort using ASCENDING order on the mixed row.

OR

First all the columns with only word-cells in the mixed row, with those columns sorted in DESCENDING alphabetic order of the word-cells in the mixed row; followed by the columns with only numeric-cells in the mixed row sorted by DESCENDING numeric order. This was accomplished by a simple sort using DESCENDING order on the mixed row.

This may sound as confusing to you as it does to me, so I have attached an example file showing hypothetical Input Data and the Desired Result.

I did the example file in multiple steps, but that's too painful in the general case where calculations determine what is in which cell in the mixed row. All data are calculated, even the word-cell data AND so dependent on other data, and the columns in the mixed row that are word-cells and those that are numeric cells don't remain the same.

Eventually I'd like to do this with a macro, so if VBA has some power to do this that EXCEL commands don't, then that's fine.

I could probably live with the final result as numeric-cell columns sorted in DESCENDING order followed by word-cell columns sorted in DESCENDING order, but I haven't even been able to accomplish that AND it's not quite the goal.

## Sorting A List Of Numbers By Multiple Columns

Oct 13, 2008

I want to sort the list like this:

1) If there is a zero (null) value in all 3 months, these records should be at the bottom sorted by record name (I did not show this field in my file).
2) If there is a non-zero (non-null) value in any of the 3 months, the records will be sorted with each other by total change.

Is there a way to do this without me doing sorts multiple times and manually moving rows of data around (which is what I have done to arrive at the list I have attached)? I am not experienced with VBA or Macros, and would prefer a detailed explanation if a solution is using either method.

## Sorting Cell With A Mixture Of Letters And Numbers?

Oct 16, 2011

I am trying to sort some data which contains numbers and letters and can't seem to find out how to personalise the sorting function on excel. Is it possible to sort cell with a mixture of letters and numbers?

Here is a link to a file to show how far I have got! [URL] .......

## Sorting Table With Array Formula?

Mar 17, 2014

I'm trying to sort a table as displayed in the image below. The table consisting of items in column A, here fruits, and a column E where totals over three month is displayed.

I have entered an array formula in column H where the total of each fruit is summed and then sorted in descending order. My problem is that whenever two fruits have equal value (here, apple and pear), Excel will not manage the display of both fruits, it will just display the first twice. The formula in column I is a simple SUMIFS.

It doesn't matter if Apple or Pear is displayed first, but I need both items to be displayed in column H.

excel1.png