Sort problem

rollo

New Member
Joined
Feb 15, 2002
Messages
43
I have a worksheet which includes the following fields:
Base.....Check.....AC.....Ref....Location
A......................PA.....N628...HTV/SPO
A...........x..........PA.....N525...LMN/PCY
B...........x..........PA.....N526...PCY/LMN
F......................BM.....G304...MPE/YUR
C......................LP.....P202...SPR/SPO
D...........x..........MB.....B190...CPN/OST
E...........x..........MB.....B191...OST/LMN
I need to find a way of sorting any of the fields ascending/descending but, where records are marked with an 'x' in the Check field, the records concerned need to stay next to each other as a pair after the sort. Is there any way that this can be done?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Two ways:

Do a Data-Sort and first sort by the Xs column, descending, and then two other columns.

Or, do an autofilter first, choose the Xs only. Then sort by whatever column(s) you want.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,424
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top