Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default sorting macro

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default sorting macro

Beth
Insrt a blank row between the title and the headings.
Don
--

"Beth Mc" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default sorting macro

See one more guess at your original post.

Beth Mc wrote:

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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Macro Jamie Excel Worksheet Functions 4 September 18th 09 06:53 PM
Help with Macro for sorting Brad[_6_] Excel Worksheet Functions 2 August 10th 09 04:20 PM
sorting using macro Ross Excel Discussion (Misc queries) 2 September 15th 05 10:13 PM
macro for sorting cherrynich Excel Discussion (Misc queries) 1 December 30th 04 04:47 PM
Macro for sorting different rows ciscopena Excel Worksheet Functions 0 November 1st 04 11:04 PM


All times are GMT +1. The time now is 07:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"