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.

View 2 Replies


ADVERTISEMENT

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...

View 11 Replies View Related

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

View 1 Replies View Related

Excel 2007 :: List Of Numbers Not Sorting Correctly?

Oct 29, 2013

Using Excel 2007, I have a very simple spreadsheet made up of only two worksheets that I am using to track the songs played by a band during a current tour.

One worksheet is called "Summary" and the other is called "Setlists". In the Setlists worksheet I list every show played (10 shows so far), and every song played from each show. In the Summary worksheet I have very song listed that has been played during the tour in one column (A), then the number of times that song has been played in another column (B). Column B, the number of times each song has been played, is populated by a COUNTIF function that looks at the Setlists worksheet and counts each instance of each song.

What I want to do, very simply, is to sort on column B in order to display the list of songs from the most played to least played. That is where I run into a problem. When I sort my list of numbers, I end up with a seemingly random list that certainly isn't from most to least and I can't figure out why.

Is it possible that the COUNTIF function which populates that column of numbers is somehow throwing off the sort?

View 6 Replies View Related

Column List Sorting Locking 2 Columns Together

Sep 24, 2006

This should be a simple question for those who have the knowledge. I am making a 2 column excel page, the first column will have an authors name and the second one will have the book name. I need to lock these two columns together so that author name and book name always stay together (side by side) on the sort command. I need to be able to sort by author or book title and I realize that it gives you the choice to expand the selection, but I can't trust that the others (kids) will realize the importance of doing so. This is going to be a very large list with hyperlinks and I can't afford to chance whether someone else will select the correct command. So a long story short. I want to build a list that can be sorted by author name or book name and be sure that the correct author will always be beside the correct book, but that are able to be independantly sorted

View 5 Replies View Related

Sorting Multiple Columns ...

Sep 3, 2009

I have a potential of 5 columns of numerical data (simple number entries) which are entered manually in no particular order.

Is there any way of sorting the data so that it is presented in numerical order (smallest to largest) starting with the smallest figure at the start of column 1 up to the largest figure at the end of column 5.

View 11 Replies View Related

Sorting Multiple Columns

Sep 8, 2008

How do I sort multiple columns at once? In other words, I have a chart that is a series of 1s and 2s, and I need all of the 1s to drop to the bottom, so that I can do a rudimentary chart in spreadsheet form. My chart has dozens of columns like so:

1 2 1 1 1 2 2 2 2
1 2 1 1 2 1 1 2 2
2 1 2 2 2 2 2 2 2
1 1 1 2 1 1 1 1 2

How do I get the entire range sorted to look like this, without having to do each column individually (hours of work)?:

2 2 2 2 2 2 2 2 2
1 2 1 2 2 2 2 2 2
1 1 1 1 1 1 1 2 2
1 1 1 1 1 1 1 1 2

View 9 Replies View Related

Custom Sorting Of Multiple Columns?

Jun 20, 2013

In Column A there are randomly assigned numbers using the RANDBETWEEN function.

In Column B there are three possible values X, Y, and Z.

I want to create a sort order where "X" is always at the top but then the rest of the rows are randomly sorted by column A (Y and Z values are intermixed).

Currently I tried to use a Custom List and the value is "X" to sort first, and then a seconday sort of Column A. The problem is that column B is always sorted by X then Y then Z where I am trying to get the Y and Z values to be randomly intermixed based on the sort of the random numbers in Column A.

I know I can manually do 2 seperate sorts each time, but I would like to save a sort list to the file so I recreate that sort over and over again.

View 3 Replies View Related

Matching And Sorting Multiple Columns

Mar 11, 2014

I need sorting a contact list of 3000 + so the emails match with the company name, and first and last name of the contacts

Column A is Email and Matches column C & D. Column B matches with Column E. I need A to match with B-E.

I've attached an example : Example Spreadsheet.xls

View 2 Replies View Related

Sorting Multiple Columns Alphabetically

May 2, 2013

How do I sort multiple columns alphabetically with the last name first, then the first name as the 2nd sorting option?

Here is an example of what I have:

year; first; last
2011 chrisBell
2010 chrisBell
2009 chrisBell
2008 chrisBell

[Code] .......

As you can see, the first names aren't sorted 100% alphabetically. I think issue stems from the years 2001 n-2006 n. I have to use the 2001 n since its a different data than the normal 2001.

The default sorting was by year:
2012
2011
2010
2009

[Code] .......

So I want it to sort by last first, then first name. Then it should sort by the default sort I already had in the left column (years).

View 4 Replies View Related

VBA / Macros - Sorting Across Multiple Repetitive Columns?

Jan 27, 2014

I have attached an example spreadsheet with two tabs. The first tab (Matrix) shows raw data scores - there are 28 measures in Column A and Participants in Row 1. There are always 28 measures but participants can vary. What I need to happen is to sort each measure in a Lineup tab i.e. rank all the participants listed in the Matrix tab from lowest score to highest score for each of the 28 measures. Obviously this can be done manually but a VBA/macro solution will be so much faster and easier. Unfortunately I have to keep the data in this format so the macro will need to transpose the data to get into the formt in the Lineup tab.

View 9 Replies View Related

Sorting One Giant Column Into Multiple Columns Based On Cell Color?

Sep 3, 2013

I was handed a pdf of some leads by a co-worker. Finally, I got the data into excel but it's in a pretty useless format... 30,000 rows of contact info with no rhyme or reason. I want to upload this into our CRM, but I need to get all the different bits of info into separate columns. I'm no excel pro, but I managed to use an Excel plugin called ASAP tools to bring some order to this chaos... All names have a blue cell color, all titles have a green cell color, work phone is red, and so on.

Does anyone know a way that I can sort these into separate columns? I've trying playing with the Filter function, but it hides rows which makes the output useless for my purposes.

View 1 Replies View Related

Excel 2010 :: Sorting On Multiple Columns - Method Range Of Object Global Failed

Feb 25, 2014

I need a macro to sort on five columns (Column A, L, P, X, and Y) out of about 33 columns. Sort is all lowest to highest.

The code I have so far is:

Sub Macro1()
Range("A2:AG").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("L2") _
, Order2:=xlAscending, Key3:=Range("P2") _
, Order3:=xlAscending, Key4:=Range("X2") _
, Order4:=xlAscending, Key5:=Range("Y2") _
, Order5:=xlAscending
End Sub

However, I get an error "runtime error 1004 - method range of object global failed".

View 1 Replies View Related

How To Combine Multiple Columns Into Long List Of Results In 2 Final Columns

Oct 15, 2013

I have a need to combine multiple columns into a long list of results in 2 final columns. Here is my example...

Current layout with varying number of data points per row...

ColumnA | ColumnB | ColumnC | ColumnD | etc...
example1 | Test1 | Test2 | Test3 | Test4
example2 | Option1 | Option2
example3 | Number1 | Number2 | Number3 | Number4 | Number5

Desired Result

ColumnA | ColumnB
example1 | Test1
example1 | Test2
example1 | Test3
example1 | Test4
example2 | Option1
example2 | Option2
example3 | Number1
example3 | Number2

and so on and on and on until all rows have been filled in down the file...

Is this possible?

View 4 Replies View Related

List Values From Multiple Columns In A Dropdown List

Dec 17, 2012

how to list values from multiple columns in a dropdown list based on lookup value of 1st column as below.

This is how the table looks like.

Product MOLD1 MOLD2 MOLD3
4" AB1 AB2 AB3
6" ZA2 zd4 -

This is how the dropdown list should look like for Product 4"

ab1
ab2
ab3

View 6 Replies View Related

Distributing List Of Numbers In One Column To Several Columns

Jul 23, 2013

I'm working with a dataset from a survey that has recently taken place. The original structure of certain questions in the survey were multiple choice. The ideal structure for these questions, in terms of variables, is that each possible option for the question (A,B,C,D... etc) have a separate value, with a 1 for yes (reported) and 0 for no (not reported). In other words, if Question1 has multiple possible answers (A,B,C...), then there should not be one variable created from this question, but rather, there should be a variable for each possible response: Question1_A, Question1_B, Question1_C, and so on. And within each of these variables, should be a 1 or 0 depending on if that option was reported or not.

The format I received the data in, though, was a single variable with a list of letters, (e.g. B,D,F) for each option reported.

Variable: Question1
Row 1 A, B, C
Row 2 B, E, F
Row 3 B, D, E

The data I have right now is housed in Excel prior to exporting to SPSS and/or STATA. I need to find a way to distribute these values into separate columns (variables). The tricky part, is that if I simply use "text to columns", it distributes the letters to new columns, but doesn't take into account that the first value reported might not be A. Is there a way to take the list of values in the single columns, and distribute them to assigned newly created columns?

View 6 Replies View Related

Macro To Sort 2 Columns Of Numbers Into A New List

Jan 28, 2007

I am trying to write a macro that will sort 2 columns of real numbers in ascending order, then merge them in ascending order into a new 3rd column.

View 9 Replies View Related

Replacing Multiple Numbers In Columns Vba

Feb 13, 2007

I have a column titled PA that has several cells with numbers, like 141, 151, 161, 242, 251, 382 etc. Is there a way that I can replace all these numbers in the column using a vba code. For example, replacing all the numbers beginning with 1** to 1 and 2** to 2.

View 3 Replies View Related

Find Multiple ID Numbers Which Match Particular Name From List?

Apr 9, 2014

I have 2 spreadsheets with many rows (in the tens of thousands) and columns (about 20 or so) of data.

I am trying to take the ID# from one spreadsheet and append it to the other, based on a name match. Typically I would use a vlookup, but, in this instance, most companies appear more than once and they often have many different ID#s associated with them. I am looking to return each unique ID# that is associated with each company, and display them horizontally next to that company's name.

Since this is including a lot of private data, I have included a small, generic example of what I am looking to search off of and output. Sample Spreadsheet.xlsx

I have seen examples of how to return multiple values using index functions, but, they all seem to only be able to handle one name at a time, and it displays the values vertically from that. Since I am trying to do this for thousands of rows of data, this won't work for me. I need to be able to have a function/formula of some sort that I can apply to each and every of the thousands of rows of data simultaneously. And, on top of that, I'd like to be able to display the 2nd, 3rd, etc ID#s for each company in additional columns of data.

View 3 Replies View Related

Identifying Duplicate Numbers In Same Row In Multiple Columns

Jun 9, 2014

I have unit measures that are converted across four columns (FT, SQFT, SQM and SQY).

THere are three units in rows (BOX, Skid and Roll). I am trying to identify in a column labeled "Duplicate Volume" with a formula stating "YES" if there are duplicate numbers (volumes) in any of the four conversion columns listed above. I tried to attach an excel file here but the system will not accept it. Hopefully the diagram i make below will be enough to understand the concept:

Unit Name FT SQFT SQM SQY Duplicate?

BOX 0 0 15 0
BOX 0 0 20 20 YES
Skid 0 10 10 10 YES
Skid 0 0 0 15
Roll 100 10 2 1.5
Roll 0 0 40 40 YES

I have over 50 thousand rows of this stuff...so looking at the data to decide if there are duplicates will not happen.

Any formula that i can put in the column titled "Duplicate" that can identify the duplicates with a "YES" in the cell where duplicates are found?

View 6 Replies View Related

Average Of Numbers From List Based On Multiple IF-OR Criteria

Feb 11, 2014

Here is my formula that does not return accurate results:

=IFERROR(SUM(SUMIFS(Tenure!$H:$H,Tenure!$E:$E,{"=1100","=1090"},Tenure!$C:$C,{"=12","=14","=13"},Tenure!$G:$G,"=1/1/2013",""})/SUM(COUNTIFS(Tenure!$E:$E,{"=1100","=1090"},Tenure!$C:$C,{"=12","=14","=13"},Tenure!$G:$G,"=1/1/2013",""}))),0)

I need to average column H from the sheet Tenure IF column E is 1100 or 1090 (formatted as text) and IF column C is equal to 12, 13, or 14 and IF column G is less than or equal to a date and column I if greater than or equal to a date OR if this column is blank.

I tried AVERAGEIFS, the above route and many others. For whatever reason, I have been unsuccessful, but close many times.

View 3 Replies View Related

Dropdown List From Multiple Columns

May 28, 2013

I am trying to make a single drop-down list which contains values from two columns.

I should give you the example immediately:

NAME | SURNAME (these are two columns)
Jon | Alfa
Karl | Beta
Lilly | Wolf

And the drop-down list should look like this:

DROP-DOWN
Jon Alfa
Karl Beta
Lilly Wolf

I have already tried to solve my problem with data validation but with no success.

View 2 Replies View Related

List Box With Multiple Columns And Headings

Jan 19, 2009

I am trying to figure this out. I have a userform with one listbox with 7 columns that displays a range. It is working except i cannot get the column headings to work.

View 4 Replies View Related

List Uniques From Multiple Columns

May 4, 2007

I would like to get a unique list of letters from multiple columns.

I tried to use this formula below but it does not work with multiple columns....

View 9 Replies View Related

Drop Down List For Multiple Columns

Jan 5, 2008

I have the following in a Validation/Data the following tries to reference and array f2:j11

=if(d5="",teammember,index(teammember,match(f2,teammember,0)))

The array 'teammember' refers to cells f2:j11. Formula returns an error message that it can only refer to a single row or column. Is there a formula

View 9 Replies View Related

Single List To Multiple Columns

Aug 17, 2006

I have a long list of 2 columns containing data as follows:
country1 date1-1
country1 date1-2
country1 date1-3
country2 date2-1
country2 date2-2
country3 date3-1
country4 date4-1
country4 date4-2
country4 date4-3

which I would need to move to get one column per country with the top cell the country name and below each name all the related dates, e.g.
country1 country2 country3 country4
date1-1 date2-1 date3-1 date4-1 etc.
date2-1 date2-2
date3-1

I have searched and found almost similar questions and tried to apply it to this case, but not being versed in VBA it was a failure on my part

View 4 Replies View Related

Excel 2010 :: Count Consecutive Numbers Over Multiple Columns / Rows

May 27, 2014

I'm using Excel 2010 and my spreadsheet contains numbers in columns A:E and approx 500+ rows. Here is a 10 row example of my data:

A B C D E
0 1 2 3 4
5 6 7 8 9
0 2 4 6 8
1 3 5 7 9
1 2 4 5 8
3 4 5 6 9
9 8 1 2 3
7 6 1 4 0
0 8 2 1 9
1 0 5 3 2

I would like to count the number of consecutive times each number appears (to a max of 9 consecutive times in a row). So, from my example above:

Number 1 appears:
1 consecutive time = 1 (appears in row 1)
2 consecutive times = 1 (appears in rows 4 & 5)
3 consecutive times = 0
4 consecutive times = 1 (appears in rows 7, 8, 9 & 10)

Number 2 appears:
1 consecutive time = 4 (appears in row 1, row 3, row 5 & row 7)
2 consecutive times = 1 (appears in rows 9 & 10)
3 consecutive times = 0
4 consecutive times = 0

Number 5 appears:
1 consecutive time = 2 (appears in row 2 & row 10)
2 consecutive times = 0
3 consecutive times = 1 (appears in rows 4, 5 & 6)
4 consecutive times = 0

and so on....

View 9 Replies View Related

Compile List From Multiple Columns / Rows

Jan 17, 2014

I want to essentially create a meal plan and then have my shopping list generated from the ingredients columns/areas into a separate sheet for printing. I need shopping list generation. I have attached a sample of what I am currently working with but still needs a lot of tweaking. I am not the most advanced excel user as you can see but I continually try to improve upon all of my work.

Test_Meal_Plan.xlsx

View 2 Replies View Related

Adding Multiple Columns For Dropdown List

Mar 5, 2013

I'm trying to set up a billing form for my work. I'm trying to include drop down list for each sections (personnel, equipment, and supplies), then all sum together as a bill. I'm not sure if this is doable in excel.

View 9 Replies View Related

Convert Address List To Multiple Columns

Apr 10, 2009

I'm looking for a way to convert an old church address list that is formatted in a single column. There are no blank rows, but the amount of rows for each entry can vary. For instance, there could be as little as 3 rows of data (church name, address, city/state/zip) or more if email addresses and websites are provided.

The data is currently in the format below (notice how one entry has a website while the other does not).

First Church
102 Main Street
Dallas, TX 12345
email@whatever.com
Second Church
500 Second Street
Austin, TX 12376
email2@whatever.com
http://www.boguswebsite.com

So I'm looking for the data to be formatted like the following:

First Church 102 Main Street Dallas, TX 12345 email@whatever.com
Second Church 500 Second Street Austin, TX 12376 email2@whatever.com http://www.boguswebsite.com

I was able to find the following code from a Google search, but it can't dynamically adjust the range.

Sub x()
Dim rng As Range

Set rng = Range("A1").Resize(5)
Do Until IsEmpty(rng.Cells(1, 1))
rng.Copy
Cells(Rows.Count, "B").End(xlUp).Offset(1).PasteSpecial Transpose:=True
Set rng = rng.Offset(5)
Loop

End Sub

I think what I need to make this code work is a way to dynamically adjust the range so that it can determine when to move to the next row of data. Static ranges break the process due to the amount of data being provided not being uniform. What I was thinking is that I could use the word "church" as a start point and end point in a loop so the script knows when to jump to the next row and begin copying the proper number of columns. I'm just not sure how to accomplish this in vba.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved