.apply

  1. F

    Sorting code brings up 1004 Application-defined or Object Defined Error

    The following bit of code brings up the above 1004 error when it gets to .Apply, but for the life of me I can't work out why! Sub DataSort() Dim wsRes As Worksheet, wsPoi As Worksheet Set wsRes = ThisWorkbook.Sheets("Results") Set wsPoi = ThisWorkbook.Sheets("Title Points")...
  2. K

    Sorting Tables (ListObjects) with VBA

    Hi All. I have a sheet with a number of Tables in it that I would like to sort on a regular basis. Currently I have the following code which works, but I'm curious to know if there is a easier way with looping to sort all the tables in the sheet at once. Any suggestions? Sub Sort_Lists()...
  3. StuLux

    Run time error when trying to apply a sort using VBA

    I'm getting error 1004 when I try to apply the following code to sort a range, I've tried several different ways of defining the range (which I need to do using variables) but it keeps failing on the .Apply line of code: Sheets(SheetName).Select SheetRecordCount =...
  4. L

    Sorting protected table by macro, run time 1004 error

    I have a button that's supposed to alphabetically sort a table by the first column so the end user won't have problems finding employees even when the worksheet is protected. Unfortunately the code that I have and that worked fine when I first tried it won't stop returning a run time 1004...
  5. L

    Sorting table macro, run time error 1004

    Hi everyone. I've got a button that's supposed to sort a table when clicked but it's giving me a run time 1004 error. Any idea why? The .Apply line gets highlighted. It happens wheter the sheet is protected or not. <code class="s90z9tc-7 klSgyG" style="margin: 0px 2px; padding: 0px; border...
  6. D

    Question about creating a macro to sort many rows individually

    I started the macro below which sorts rows 1-3 individually from smallest to largest. It sorts B1:E1,then B2:E2, and then B3:E3. The code is the same for each row of the worksheet with the exception of three minor changes in the code due to moving to the next row. I need this macro to...

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