AutoFilter Sort Of Numbers Wrong Order
Apr 3, 2008
I am using the autofilter function on a spreadsheet and the first column displays numerical data ranging from 1 to over 100. When I apply the 'Sort Ascending' from the autofilter on this column, it is attempting to display the data in alphabetical/numerical order however the order it is displaying appears such as this 1, 10 , 100, 101, 102, before moving on with data that starts with 2 (2, 20, 21, 22, 23 etc). Is there a way I can filter this column to display literal numerical data such as 1, 2, 3, 4 etc?
View 2 Replies
ADVERTISEMENT
Nov 5, 2008
Im totally new to excel and have some data i need to sort. how to sort numbers into ascending order across a row. ie, I have 34 2 45 79 102 63 etc, and I need them to start low and order to high. i have over 1200 rows, so it would be good to do the whole sheet at the same time.
View 4 Replies
View Related
Aug 27, 2012
I have a column (B) of randomly generated numbers 1-14, and am using this formula range to sort in descending order and return the relevant value from column (c).
=VLOOKUP(LARGE(B3:B20,1),B3:C20,2,) to =VLOOKUP(LARGE(B3:B20,14),B3:C20,2,)
Works great, except when a number is duplicated, (E.G. 14,13,13,12,11,10,10,9,8 etc). It then returns the first value from(C) repeated, and not the value from the second and subsequent duplicated reference numbers.
View 3 Replies
View Related
Mar 14, 2014
I have a sheet called "interface" which people can input the date in cell A2.
The autofilter in sheet"originaldata" will filter the data according to the date in cell A2 in sheet "interface"
However, when i input the date 01 Aug 2009, the filter will give me 08 Jan 2009
VB:
Sub Date_filter()
Dim Inputdate As Date
Sheets("interface").Activate
Inputdate = Format(Sheets("interface").Range("A2").Value, "dd mmm yyyy")
[Code] ....
View 1 Replies
View Related
Jan 25, 2008
I am running into a roadblock, I have added an auto filter to my spread sheet, however now when I use it the filters I select are not showing up on the column that is being filtered. For some reason they are 2 -10 colums over, a totally seprate column it is kinda weird.
View 9 Replies
View Related
Nov 28, 2007
I'd like to add items on a UserForm1 ComboBoxes in the correct order but I can't. That's because with the code below, in ComboBox6P1 the items are added with mixed order:
For Each thing In .Range("AC6", .Range("AC65536").End(xlUp)).SpecialCells(xlCellTypeConstants)
If Trim(ComboBox4P1.Text) = thing.Value Then
For Each aNew In .Range("AD6", .Range("AD65536").End(xlToRight)).SpecialCells(xlCellTypeConstants)
If aNew.Row = thing.Row Then
ComboBox6P1.AddItem aNew.Value
End If
Next
Exit For
End If
Next
I should add items in ComboBox6P1 in order -> AD6, AE6, AF6, AG6, AH6, the rest are empty cells. Instead of it adds AF6, AG6, AH6, AD6, AE6. When I change .SpecialCells(xlCellTypeConstants) to .SpecialCells(xlCellTypeVisible ) it adds it in the correct order but with another 200 emtpy cells in the ComboBox6P1. The format of the cells is General.
View 9 Replies
View Related
Oct 8, 2006
Is it possible to make excel sort ascending or descending but from mid way through alphabet and then loop through the alphabet again. for example. If Cell A1 had "A" in, it would sort as normal.
Cell A1 = A
Cell A2 = B
Cell A3 = C
Cell A4 = D
Cell A5 = E
If Cell A1 had "C" in, it would sort from "C" through the alphabet and then loop to the start of the alphabet as shown below.
Cell A1 = C
Cell A2 = D
Cell A3 = E
Cell A4 = A
Cell A5 = B
View 4 Replies
View Related
Oct 5, 2007
I have a list in rows where I have a ranking formula =COUNT($G$5:$G$81)-(RANK(G5,$G$5:$G$81)+ COUNTIF($G$5:G5,G5)-1)+1 When I sort the rank, ascending. All of the unique numbers sort ascending, but the non-unique numbers sort descending
ex) 1.751
2.52
3.753
418
417
416
View 5 Replies
View Related
Dec 1, 2006
So for a program I am writing, the user inputs a text string of 200+ alphabetic letters. Only 20 of the 26 alphabet can be in this input (excluding BJOUXZ). What I need to have a macro or function do is check to make sure none of these 6 alphabet letters are present in the string, and also check to make sure no numbers are present either.
Also, I would love for the input text to be converted to Uppercase for all letter as it does this check.
View 9 Replies
View Related
Aug 2, 2007
i have A1:A60 filled with numbers. however, they are ordered incorrectly. how can i order then in B1:B60 in the following way?
1st cell
7th cell
13th cell
19th cell
25th cell
31st cell
37th cell
43rd cell
49th cell
55th cell
2nd cell
8th cell
14th cell
20th cell
26th cell
32nd cell
44th cell
50th cell
56th cell
etc.
until the 60th cell
View 9 Replies
View Related
May 9, 2014
I have a list of data with headings number,name, surname,group. Data needs to be kept in the rows as they are now but I would like to sort the order by group. The group order needs to be:
sm, u17m, u15b, u13b, u11b, sw, u17w, u15g, u13g, u11g. I would like to do this using vba and have a blank row between each group.
View 11 Replies
View Related
Feb 10, 2009
I need values from column F in ascending order.
Also I need in column G only the values without formula.
View 14 Replies
View Related
Nov 20, 2007
I'm sure this has been asked many times before, but I can't seem to find an answer that works for my data. I have some data that is sorted by an ordered list (like a table of contents from an overly detailed book):
1.0
1.1
1.2
1.2.1
1.3
...
1.11
...
This list can be arbitrarily deep (although probably not more than ##.##.##.##), and because I'm using periods to separate the nested levels (can be changed), I've formatted it as text. This means when I sort the data using this column I get 1.11 before 1.2 (text sort order).
After lots of failed formula attempts I've resorted to using an additional column with hand-entered values to sort by so it will sort correctly:
1.00.00
1.01.00
1.02.00
1.02.01
etc
but I'm hoping someone knows a more elegant way to do this, or at least to generate this column without typing so many zeroes!
View 9 Replies
View Related
May 30, 2008
I have a client with a list of books, and they are trying to sort a column in a sheet that has LC classification codes. When just doing a normal A-Z sort, it looks like this:
RJ 41 .D53 F54 2005
RJ 416 .L4 C52 1999
RJ 420 .D5T97 2003
RJ 421 .H385 2006
RJ 426 .H43 P43 2005
RJ 431 .M37 2003
RJ 436 .A8 R33 2006
RJ 436 .A8 T498 2001
RJ 436 .A8 T87 2003
RJ 45 .N4 2000
RJ 45 .N418 2006
RJ 45 .R92 1998
RJ 47 .E39 2001
RJ 48 .H37 2000
RJ 48 .H37 2002
RJ 48.2 .C537 2004
RJ 48.2 .P347 2005
RJ 48.2 .P385 2005
RJ 48.2 .R93 2003
RJ 480 .P34 2005
RJ 482 .R48 L448 2004
RJ 486 .C45 2000
What is weird about it is that I would think that the numbers after the RJ would be in numeric order but it seems to be treating them as codes. So, instead of RJ 41, then RJ 45, it goes on with a series of things that start with RJ 41. Is it normal for this to happen, or is there a way to change it so that it goes 41, 45, 47, 48, then 416, 420, etc.
View 9 Replies
View Related
Feb 13, 2007
I feel I've searched thoroughly and wasn't able to find the right answer. I've attached a daily report example that needs the "Product" field to be sorted in a particular order. The order should be JEX, Q3791J, YOO5, KLX9, GHT (all similar products need to be grouped together).
Since the report is run daily the number of rows changes daily: one day can have 50 entries and the next 10. Is there a way to dictate the sort order and insert a blank row between each product grouping?
Once the Products have been separated into their groups, how would I sort each grouping by the "Term" column?
View 9 Replies
View Related
Dec 17, 2013
I have imported data and numbers from a website and would like to sort the data in numerical order. Excel wants to sort the data 1,10,2,20... in that order. I know from past experience with an older version there was a way to convert the numbers so they can be sorted in the way that I want.
View 2 Replies
View Related
Jun 14, 2014
I have 2 listbox (List1 and List2). List2 get populated when the user select a value in List1 and based on the value selected in List1. My issues are:
1- Values in list2 are not sorted in ascending order especially when the list2 grows over 32.
2- When the user selects "None" in List1, it should clear List2 (onclick)
I worked on this code for a while with no luck trying to get it to work. Is that doable?
VB:
Option Explicit
Dim ufEventsDisabled As Boolean
Function SelectedString() As String
Const Delimiter As String = ","
Dim i As Long
[Code] .....
View 9 Replies
View Related
Mar 15, 2014
Don't know if macro is better, but I would like to try it with function
I have 2 sheets.
Sheet 1
Column A: Name
Column B: Points
Exemple:
Name Points
Mary 40
Johnny 20
Erick 60
Ralph 30
I want Sheet 2 to get data from Sheet 1 and sort by descending order automatically.
Then it should be
Sheet 2
Name Points
Erick 60
Mary 40
Ralph 30
Johnny 20
I don't want to do it manually every time I change some value; I want it to do automatically; so if I change, for example, Erick's points from 60 to 10 in Sheet 1, Erick should appear on the last place in Sheet 2, with his new value (10)
View 1 Replies
View Related
Feb 20, 2009
I have a spreadsheet for work that consists of various columns of data. One important sorting column would be Job #. Inside this coulumn are data like 134-Q and 2355-P and 755-P for example. The sort now is like posted. I would like to be able to sort by both alphabetical and numerical order. ie, 755-P, 2355-P, then 134-Q.
View 5 Replies
View Related
May 1, 2013
My dates are sorting as per the image below.How do I get them to sort in chronological order (e.g. 01 January, 02 January etc)
Excel Forum.PNG
View 10 Replies
View Related
Oct 19, 2009
I have to sort data on 3 criteria
The data is:....
At this time I sort by HOURS then Seniority so the sort would look like this:........
Here is the problem, RN HILLER and JA DOE have the same hours and seniority. It is our policy that when 2 or more names and seniority match, they must be sorted by reverse order first letter of last name.
So this would be correct. H in Hiller comes before D in doe when reverse sorting.....
View 4 Replies
View Related
Oct 7, 2011
I have the below code that sorts a list of Doors that I have in row C17 downwards. Door 54, Door 7, Door 109 etc. The list is feeding a drop down box, people find the door they were looking for, in the said drop down box.
Code:
Sub ListSorter()
Dim LastRow As Long
LastRow = Range("C" & Rows.Count).End(xlUp).row
[Code]....
I wondered if there was some code I could add to the end of this, that would the sort worksheets, which are all named after each cell in the list, in the same order.
View 3 Replies
View Related
Sep 25, 2012
In the below code, when I want to sort on Column "A" it is not working. Anything stand out that would prevent my code from working?
Sub Delete_Duplicates()Dim LastRow As LongWith Sheets("SAP Raw Extract")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row 'Create ID Column
.Columns("A:A").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove .Range("A1") = "ID"
.Range("A2").FormulaR1C1 = "=RC[5]&RC[6]&RC[32]"
[Code] .....
View 3 Replies
View Related
Jun 17, 2009
I'm using a table with columns from A to F and an unlimited number of rows. Note that there is a title at the top of each column.
-I'd like my datas in column F to be automatically sorted in descending order from top to bottom when I hit the enter key or when the number is entered in last column (column F).
-the the entire row of data needs to be sorted according to the sorting criteria of column F ( datas entered need to stay on the same row)
-the macro should validate that the number value entered in column F is the same as the number value entered in column A. (to make sure that there was no typing mistake)
-Result in column D must be the difference between the corresponding value in column B and C (B-C=D)
*The next couple of constraints are not absolutely required, i'd like to have them only if it's possible to add constraints with filling color:
-Whenever there is no value entered in column C on a specific row I'd like the entire row to be colored in yellow (fill color)
-IF a number is entered in column C, and that the result of B-C in column D is not equal to zero, I'd like this specific row to be filled in Red.
-when all the values are entered in a row from column A to F and that the result of B minus C is equal to Zero in column D, i'd like this specific row to be filled in a green color.
***in other words, the datas in each rows from column A to F will be entered on 2 occasions; on the first time, only the datas in column A,B and F will be entered (so basically after entering this set of values the row should be filled in yellow. the second time, the remaining values will be added to the rows, so at this time A,B,C,D,E and F will all be entered. when this is done there will be two options
1-the value in column D is equal to Zero then the entire row should be filled in green or
2-the value in column D is'nt equal to zero, then this specific row should be filled in red.
Keep in mind that the datas of a row should be automatically sorted only when the value in column F is entered or when the enter key is hitted to add a new row.
View 9 Replies
View Related
May 13, 2009
I am trying to create custom sort list. It works below when I define range as A1:A79.
Sub SortWS2()
Dim SortOrder As Variant
Dim sheetsorder As Range
Dim Ndx As Long
Application. ScreenUpdating = False
With Worksheets("Sort Order").Range("A1:A79")
For Ndx = .Cells.Count To 1 Step -1
Worksheets(.Cells(Ndx).Value).Move before:=Worksheets(1)
Next Ndx
End With
Application.ScreenUpdating = True
End Sub
I have created a dynamic range called sheetsorder. If I revise my code it does not work.
Sub SortWS2()................
View 6 Replies
View Related
Aug 9, 2006
I have a worksheet populated with text and values from column A to BG, and from row1 to row550. Column B contains only the following text and values:
TKM SG
1
TKM Kulim
zero bin (internal)
0.33 bin (internal)
3
ESC
2
zero bin (AMA)
I need help for VBA code to sort the worksheet by this order of preference in col B as follow. Appreciate your help.
1
2
3
TKM SG
TKM Kulim
zero bin (AMA)
zero bin (internal)
0.33 bin (internal)
ESC
View 5 Replies
View Related
Feb 23, 2007
I am trying to do 2 things.
1) I want to make a drop down box with 3 differnent sort orders options in it.
- Sort by date
- Sort by Customer
- Sort by priority level
Once they select a view, it will then sort the rows to that view.
2) I want to do a filter box, so if I type a cutomers name, it will filter to only show the rows related ot that customer.
View 9 Replies
View Related
Apr 4, 2007
I am trying to sort a combo box by ascending order...this combo box displays 2 columns of data which are populated from a spreadsheet. I would like to sort by the first column in the combo box which is numeric, but I do not want to sort the actual data on the spreadsheet.
View 2 Replies
View Related
Oct 11, 2007
I am trying to sort worksheets in excel by numerical order. I have renamed each worksheet with a different zipcode that corresponds to data on that sheet.
I believe there might be two ways to do this,
1) by sorting numerically the worksheet names.
2) by perhaps referencing a cell on each worksheet (i.e. the zipcode) and sorting it that way.
View 7 Replies
View Related
May 14, 2008
I am trying to sort different SKU #'s for my amazon store on excel. I go to Data... Sort... Ascending and it comes out like this...
UP1
UP10
UP100
UP101
UP102
UP103
UP104
and so on...
i want it to be like this
UP1
UP2
UP3
UP4
UP5
View 3 Replies
View Related