custom sort

  1. T

    VBA Sort causes Excel to crash

    Sub AutoSort2() ' ' AutoSort Macro ' This will sort by the list of topics ' Dim dynlist As Variant dynlist = Application.Transpose(Sheet2.ListObjects("table2").ListColumns(2).DataBodyRange) ActiveTable = ActiveSheet.Range("b15").ListObject.Name...
  2. S

    custom sort button vba

    i need two buttons to sort my data because some days i need my data sorted in way 1 and sometimes in way 2 so i need 2 different buttons for it way 1: its a custom sort on column M and the custom list is ( 24 H, 48 H, 3 days, 4 days, 5 days, 1 week, 2 weeks, 1 Month, 2 Months, Monthly, Yearly)...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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 "" However, "æ" >...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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 =...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

This Week's Hot Topics

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back