ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Auto filter run from a macro will not do the same as when done manually. (https://www.excelbanter.com/excel-discussion-misc-queries/128933-auto-filter-run-macro-will-not-do-same-when-done-manually.html)

ChemicalJasper

Auto filter run from a macro will not do the same as when done manually.
 
I have a sheet that on running the macro, pulls in certain data from
the master page and formats it for printing a display.

The last item in the macro is to sort one of the columns in ascending
order.

Most of the macros are recorded from screen actions.

From the screen the autofilter sort ascending works fine, however when

I record it, I get one of two problems...

1. If I do not edit the macro, it sorts the data, but moves everthing
up one line (in this case into the colum headers box, row 9)

2. If I change the selection reference to the cells below (B9:P500) -
(B10:P500) it then fails to sort the first row of data into an
ascending order. (PS the first row of data is actually on row 10, row
9 is the bottom of the column headers row).

Is this a glitch, have I done something wrong???

Any pointers would be much appreciated!



All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com