ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sorting in 2007 (https://www.excelbanter.com/excel-programming/415900-sorting-2007-a.html)

LuisE

Sorting in 2007
 
I need a macro for 2007 to sort by columns A, B and C then after I do
something else I need to resort by D, A, B and C.

The problem I think is that Excel keeps the original sorting criteria and
adds the new to the end. How can I reset the sorting conditions to it starts
fresh the second time?


Thanks in advance


Barb Reinhardt

Sorting in 2007
 
Please post your code and someone should be able to show you what needs to be
done.
--
HTH,
Barb Reinhardt



"LuisE" wrote:

I need a macro for 2007 to sort by columns A, B and C then after I do
something else I need to resort by D, A, B and C.

The problem I think is that Excel keeps the original sorting criteria and
adds the new to the end. How can I reset the sorting conditions to it starts
fresh the second time?


Thanks in advance


Dave Peterson

Sorting in 2007
 
I didn't start xl2007 to test this, but I've seen this kind of stuff posted in
the newsgroups:

activesheet.Sort.SortFields.Clear

LuisE wrote:

I need a macro for 2007 to sort by columns A, B and C then after I do
something else I need to resort by D, A, B and C.

The problem I think is that Excel keeps the original sorting criteria and
adds the new to the end. How can I reset the sorting conditions to it starts
fresh the second time?

Thanks in advance


--

Dave Peterson


All times are GMT +1. The time now is 01:16 AM.

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