sorting macro

  • Thread starter Thread starter Beth Mc
  • Start date Start date
B

Beth Mc

I need to sort a column ascending upon closing the
workbook.. I got it started with an Auto_Close macro.
However G2 contains my heading, G1 contains my title, and
G3 is where my data starts, so I keep getting a debugging
error.

Sometimes it runs the sort without giving me a debugging
error, but then it is moving the header row of A2:G2 below
the data when it sorts. So instead of A2:G2 showing the
column headers, the column headers are moved to A11:G11
and the data is sorted (correctly) in A2:G10. The column
headers for H2:P2 stay in the same place.

Thanks for the help,
Beth
 
See one more guess at your original post.

Beth said:
I need to sort a column ascending upon closing the
workbook.. I got it started with an Auto_Close macro.
However G2 contains my heading, G1 contains my title, and
G3 is where my data starts, so I keep getting a debugging
error.

Sometimes it runs the sort without giving me a debugging
error, but then it is moving the header row of A2:G2 below
the data when it sorts. So instead of A2:G2 showing the
column headers, the column headers are moved to A11:G11
and the data is sorted (correctly) in A2:G10. The column
headers for H2:P2 stay in the same place.

Thanks for the help,
Beth
 
Back
Top