custom sort

  1. tlc53

    VBA Code - Sort by Custom List Reference

    Hi there, I am trying to sort my data which is located under headings A52:K52 by the account number order, as stipulated in cells K21:K35. This is my attempt but it is possible I'm way off the mark. Can anyone see how I can get this working please? I don't want to refer to a particular sheet...
  2. V

    Custom sort order

    I have a list of products that need to be sorted in a very specific manner - the final sort order should be as described in the column titled "Overall Rank". The problem I have is that I need to first sort the products by the column titled "Date". Then, for a subset of the products (namely E...
  3. tlc53

    VBA Code - Custom Sort Data based on Range

    Hi, I have data headings on cells A50:K50. The length of the data underneath can not be determined, as it'll change all the time. I would like to sort the data underneath by account number, which is located in column K (header K50). The order I would like it sorted by is listed under K43:K48...
  4. L

    Sorting with vba, custom sort?

    Hi all, I am trying to sort a table in excel, I have the following code so far: <code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Sub Sort_Table() Sheet6.ListObjects("Sort_table").Range.Sort...
  5. E

    Sort columns by occurance

    Hey guys, I am trying to sort a column by the occurance (or count) of a particular word. So for example if I had a column similar to this Cat Cat Cat Dog Dog Dog Dog It would sort the column based on their count (the items with the most occurance would be listed first and so forth). So it...
  6. R

    VBA Sort Col's Independent of One Another

    Hello, I'm trying to figure out how to sort columns independently of one another using VBA, and I have a good little piece of code that does this for me (see below). However, I've run into a couple of other things. Some columns may need a custom sort order, not just ascending. What does...
  7. A

    Custom Sort when worksheet changes

    I am looking for some advice. I have some code that will sort the columns exactly as I need but currently sorts in ascending order. I am looking to modify the code to sort by a custom order. I recorded a macro to try and work out the code but when I place the recorded bit of code in my...
  8. M

    Code runs in Module not in sheet code

    Hi, I have a custom sort code, which runs perfectly when I am calling it from a module, but when I copy it inside the my codes in the sheet, and address it, it returns error. Can somebody help and explain? here is my code: Sub custom_sort() Application.calculation = xlManual...
  9. R

    Sort array w/ custom alphabet [a-z + æøå]

    I wish to sort an array of strings alphabetically including the nordic characters Æ, Ø, Å. Nordic alphabet = "abcdefghijklmnopqrstuvwxyzæøå" Most sorting algorithms I've come across (bubble, quick, merge) sorts by checking if "bb" > "ba". which works well for "01...89abc..xyz" However, "æ" >...
  10. L

    Custom Horizontal Sort (VBA)

    Hi there. I've put together a small bit of code that applies a custom sort order horizontally, which is defined by the contents of a range of cells on another tab. Here's my code: Sub Custom_Sort() With Sheets("Data") Application.AddCustomList ListArray:=Sheets("Sort...
  11. M

    VBA custom sort by category total

    Tried my best to figure out the best way to do this and came up short. My data looks something like this: <tbody> Category 1 Category 2 Account Desc FY13 FY14 FY15 Revenue Product 1 Sales 100 110 115 Revenue Product 3 Sales 100 150 300 Cost of Revenue Product 1 COGS 20 30 30 Cost of...
  12. andrewb90

    VBA sorting error

    Hello All, I used the macro recorder to sort a range automatically and it seemed to work when I recorded it, but now I get an error, I was hoping someone could help me figure out why Sub range() range("B5:V341").Select ActiveWorkbook.Worksheets("Shed").Sort.SortFields.Clear...
  13. J

    Custom sort using named ranges

    Hello - I'm having trouble developing a custom sort code that uses values in a named range for the sort options, and was hoping that someone could point out what I overlooked - I just started using sort codes yesterday, and the Range.Sort syntax provided by Microsoft is less than helpful.. I'm...
  14. W

    Custom Sort List For Pivot Table

    I am trying to use VBA to create a custom sort list for a pivot table based on the order of items on wkst SortLst. My Pivot table is is Sheet2(Company Wide). I am getting subscript out of range error. Sub PivotTableSortUsingCustomLists3() Dim rng As Range Set rng =...
  15. M

    Custom sort macro

    Hi I'm having some problems with a custom sort in a macro I've made. Below is the extract of the specific piece of code, the error occurs on the penultimate line where it tries to apply the sort. This part of the code is right at the end of the macro (it's rather large hence not posting all...
  16. A

    A few problems with creating a custom sorting list.

    Hey all! I've got a few problems but they're all related to the same thing I'm trying to do, so I'm just going to group them all together in this post. I'm using Windows 7 and Excel 2010. Sorry in advance for the wall of text! First problem: I'm having a hard time trying to create a custom...
  17. R

    Regarding sorting 3 rows of data in the same line

    Hi there, I am new to this forum. I have a question regarding excel and would appreciate it if someone could help. Basically, I have 3 sets of data with the following columns: A B C D E F AB 10 AB 9 AC 5 BA 10 BA 10 BA...
  18. Q

    Creating a autofill list with custom sorting

    Hello everyone, I'm having difficulties creating this copy and delete text for my batch program. I have this sheet: <tbody> Data Data New Data New NL Data New FR X_SUPPLIER_1000057 XEN_SUPPLIER_1000057 XNL_SUPPLIER_1000057 XFR_SUPPLIER_1000057 X_SUPPLIER_1000058 XEN_SUPPLIER_1000058...
  19. J

    Custom Sort

    Hi all, For the following piece of code, I am getting a Runtime error '13', Type Mismatch Error when it reaches the following piece of code ActiveWorkbook.Worksheets("3. PMO Internal View").Sort.SortFields.Add Key:= _ f, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _...
  20. R

    Custom Sort - Could not solve

    Hi All, I am quite new to excel. I have a requirment. I have rows of Data that comes from a source Something like below <TBODY> #NULL# 30 Aerospace 50 Black 70 Catamarin 30 Total 210 </TBODY> This has to be sorted as below <TBODY> Aerospace 50 Black 70 Catamarin 30 #NULL# 30...

Some videos you may like

This Week's Hot Topics

Top