ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sorting - Macro or worksheet function (https://www.excelbanter.com/excel-worksheet-functions/38373-sorting-macro-worksheet-function.html)

Danny

Sorting - Macro or worksheet function
 
I use 9 columns named: Col A = Code; Col B = Date; Col C = Name; etc. The
rows beneath these columns are sorted according to Codes (from 1 to 7). I
sort Col A = AScending; Col B DEScending and Col C AScending.

In Col B, there are sub-headers coded from 1 to 7. I sort column B
DEScending in order that the subheader (say, Applicants) will be on the TOP
row of the Code 1s. If I sort it Ascending, sub-header Applicants will be
on the last row of the Code 1s.

Right now, by sorting Column B DEScending €śApplicants€ť is on top but the
dates below it are sorted DEScending (of course). Is there a way (worksheet
function or VBA) that would sort Column B with sub-header €śApplicants€ť on top
and the dates will be sorted ASCENSDING?

Thanks a lot.


Anne Troy

It sounds like your heading rows are being included in your sort? Use
Data--Sort and tell it you have a heading row.
*******************
~Anne Troy

www.OfficeArticles.com


"Danny" wrote in message
...
I use 9 columns named: Col A = Code; Col B = Date; Col C = Name; etc. The
rows beneath these columns are sorted according to Codes (from 1 to 7). I
sort Col A = AScending; Col B DEScending and Col C AScending.

In Col B, there are sub-headers coded from 1 to 7. I sort column B
DEScending in order that the subheader (say, Applicants) will be on the

TOP
row of the Code 1's. If I sort it Ascending, sub-header Applicants will

be
on the last row of the Code 1's.

Right now, by sorting Column B DEScending "Applicants" is on top but the
dates below it are sorted DEScending (of course). Is there a way

(worksheet
function or VBA) that would sort Column B with sub-header "Applicants" on

top
and the dates will be sorted ASCENSDING?

Thanks a lot.





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

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