dataoption=xlsortnormal

  1. G

    Creating a variable cell reference in a 'sorting' macro

    Sub All() ' ' All Macro ' ' Keyboard Shortcut: Ctrl+z ' Range("A6:Z23").Select ActiveWorkbook.Worksheets("All").Sort.SortFields.Clear ActiveWorkbook.Worksheets("All").Sort.SortFields.Add Key:=Range("Z6:Z23"), _ SortOn:=xlSortOnValues, Order:=xlAscending...
  2. A

    Object variable or with block variable not set

    I have a worksheet I am trying to create a filter for. I recorded a macro with all of the filtering set to what I need. When I try to assign it to my ComboBox and run it I am getting a Run-Time Error 91 Object variable or with block variable not set. It is highlighting the section "...
  3. C

    excel vba on change events for sorting if changed from......

    So I have the below code which works perfectly (maybe could be cleaned up a little but its working) what im trying to figure out if right now if column I changed then it runs the sort or if "ETOX-SKIP" is selected from the drop down in column D then it sorts. The thing im trying to figure out...
  4. M

    VBA sort table based on one column

    Hi I have the below code but realise believe it is sorting only one column which means the other columns will be out of sync? With ActiveWorkbook.Worksheets("Tech FootPrint") lastrow = .Cells(.Rows.Count, "B").End(xlUp).Row .Sort.SortFields.Clear...
  5. L

    Sorting in Excel from Access

    Hello Having tried unsuccessfully to find a solution to the below issue on both google and old threads in this forum I kindly request any suggestions as to how to solve this problem. I'm simply trying to sort a range in an Excel file from Access, but it's erroring with everything I try. My...
  6. F

    Macro edit - tab character limit

    Good morning, I have a macro that organizes data and then splits that data into different tabs based on a name in column AC. The issue I just ran into was when the name was too long for a tab (character limit I believe is 30). Is there a way to update this macro to either read only to the 30th...
  7. K

    Excel VBA sort sometimes stops (but doesn't error)

    This one has been driving me nuts for some time so I'm hoping one of the knowledgeable people here has an answer. I have a massive spreadsheet (11 MB and growing) that I use to track stock trading data. Imbedded w/i the spreadsheet are many RTD functions calling ToS to get real time data on...
  8. S

    VBA Data Sort (Keep Cell Formating while Only Moving Text)

    Hi, I currently have a code that automatically sorts data on multiple worksheets when the workbook is open and it works fine. Most cells in the E9:J28 Range have no fill colour; however, there are some cells (in rows) that are intentionally blacked out. Can anyone help me out to tweak this VBA...
  9. S

    Loop recorded macro through all worksheets

    Hi, I am trying to loop a one worksheet (name of that worksheet was Booking)recorded macro through all the sheets in the workbook. The recording was to sort data within a range alphabetically. No security issues I am aware of. If anyone could amened the following code to this, that'd be...
  10. S

    Sorting multiple range but error

    hi below is my macro.. with error reference is not valid. i went though the web but can't find answer that satisfy me. Please help Range("A8:Q500").Select ActiveWorkbook.Worksheets("NAVAnalysisChk").QueryTables(1).Sort.SortFields. _ Clear...
  11. A

    Excel VBA question sorting data twice

    Hello, I would like to be able to sort a priority list using VBA. I would like to sort first by priority override, simple number sort that trumps anything else. Next I would like to do a "combination" sort. First sort on absolute need date, then on priority: high, medium, low. Then I would...
  12. B

    Dynamic range

    I have the below code in macro... under the key range ("a1:a4162).. which meand during the record of my macro my data is up to 4162. i need this to chnage if i populate my sheet with data with 5000 Range("A1").Select Selection.AutoFilter ActiveWorkbook.Worksheets("Incident...
  13. S

    Looping through all worksheets

    My code is supposed to loop through all worksheets and perform the formula and sorts on each worksheet in the workbook. It performs the first task of inserting a line on all sheets but it does not finish the rest of the code on the rest of the worksheets. I've made the first line that is...
  14. G

    I need to fixed this Code Please

    I want to sort some rows only, HELP Please.. Sub xx1()On Error Resume Next With Worksheets("Jan").Sort .SortFields.Clear .SortFields.Add Key:=Range("e:e"), _ SortOn:=xlSortOnValues, _ Order:=xlAscending, _ DataOption:=xlSortNormal .SortFields.Add Key:=Range("e14;e26"), _ SortOn:=xlSortOnValues...
  15. S

    Loop Macro on all worksheets

    Can someone help me loop this macro on all worksheets? (theres 47) Sub AM2_Format_Util_Template() ' ' AM2_Format_Util_Template Macro ' ' Columns("AC:AC").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False...
  16. hendrikbez

    sort of my cells in a workpage

    I have this as a micro Sub sort1() ' ' sort1 Macro ' ' Range("A4:F18").Select ActiveWorkbook.Worksheets("All").sort.SortFields.Clear ActiveWorkbook.Worksheets("All").sort.SortFields.Add Key:=Range("F4:F18"), _ SortOn:=xlSortOnValues, Order:=xlAscending...
  17. Z

    Key:= Range help

    Hi this works fine right, but I'm trying to change the range as my sheet extended a little. So I don't have to keep changing it I want to change range to C4:C B4:B & B4:AH if I change it all it breaks at each spot range above. I think there is something small I'm missing and cant...

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 MrExcel.com.
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 "mrexcel.com".
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
Back
Top