order=xlascending

  1. jbesclapez

    Why in this macro there is telling Error104 Select methode of range class failed

    Hi, I made this macro and get an error on this line Worksheets("Temp").Range("A1").SelectI run the macro from the sheet Q-Simple. I dont know why there is this error because if I select the sheet, than that means it is activated... so why this error. It is so basic... Please give me a clue...
  2. R

    Odd Error - Once in a While

    Hello, I'm Receivng an error when I open a workbook: Any ideas as to what may be causing it? The workook is an xlsx workbook, so no macros/VBA. Although, a macro is used to create the workbook and there is a sort associated with that macro but that code is in a different workbook. Thank...
  3. M

    Looping and advancing

    Hi all, I know there has to be an easier more efficient way to do this... In column B I have random numbers, sorted into "books" of 10. I'm looking to sort each of the "books" ascending, but each book by itself. I recorded some code, but REALLY don't want to have to hardcode and edit each...
  4. 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...
  5. 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...
  6. 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...
  7. T

    Repeat Sort Macro for Paired Rows Down Entire Sheet

    Hi all, trying to sort dates and events on those dates which are in two rows like so: <tbody> 4/2/2016 6/3/2016 7/7/2015 1/2/2016 6/6/2016 6/15/2016 AAA CCC </tbody> These rows continue for hundreds of columns, and there are hundreds of row pairings themselves. Some of the dates...
  8. D

    Selecting all data on a Worksheet

    I have recorded a macro to sort my worksheet in a specific order and I get the following VBA. Cells.Select ActiveWorkbook.Worksheets("DReg").Sort.SortFields.Clear ActiveWorkbook.Worksheets("DReg").Sort.SortFields.Add Key:=Range( _ "A2:A10"), SortOn:=xlSortOnValues...
  9. J

    Sort By Column D THEN auto-scroll to currently selected Row's Column D value?

    I have code that sorts from A-Z based on Column D's values. After the Sort completes the cursor parks itself at B4. Works fine, but instead of parking at B4 I'd like to have the cursor scroll to the Value that was in Column D for the Row that was selected when the Sort macro was run. Here's...
  10. J

    Sort By Date THEN auto-scroll to current date

    I have a macro that sorts my data based on dates in Column B. As you can see, after the sort completes the cursor parks itself at Cell A1. What I'd like is for it to auto-scroll down to the current date (or closest date) in Column B. Here's my current code: Sub SortByDate()...
  11. B

    'Subscript out of range' problem when calling a sub from a different sheet

    Dear Experts, Unfortunately I'm not good at vba coding and I cannot figure out why the last Call in the following code does not work and gives a "Runtime error '9' - Subscript out of range" error. The macro to be called runs perfectly when started manually. Here is the main code: Sub...
  12. A

    VBA custom sort

    I have recorded the following macro while doing my custom sort: Sub sortMembers() Dim ws As Worksheet: Set ws = Worksheets("RefindData") ws.sort.SortFields.Clear ws.sort.SortFields.Add Key:=Range( _ "A2:A9998"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _...
  13. melodramatic

    VBA sort variable range - Run-time error '1004' : Method 'Range' of object'_Global' failed

    I am running a macro that pulls in a grouping of files, and then before sending it to a chart, make sure that all of the data is in timestamp order. At the top of the pull-in page, I've created cells that do a count of rows and columns (Cell "A1" is the last data row, Cell "A2" is the last...
  14. 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...

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