Different sort criteria in single data set

Vol4Ever

New Member
Joined
Nov 13, 2019
Messages
1
This is one for a hobby. I have a card collecting spreadsheet that lists all available cards with columns for various stats like name, weapon, class, etc. Final column is either owned, wanted, or just blank. I set up a quicky VBA macro to sort everything by my desired "order of columns" method & it works fine. My problem is that last block of data where status is simply blank. For those cards, and ONLY those cards, I want to simply sort alphabetically by name.

Macro problem is the sort's starting cell is a moving point. Wanted becoming owned is no big deal as those sort correctly with the macro, but occasionally I'll draw one that's currently simple blank status. It's status changes to owned, which means block of data to sort solely by name is overall 1 row smaller. Trying to find proper code to select only those rows where column J = "", and then sort by column A. Given the way the first half of the macro works, those cells will always be continuous block at bottom of spreadsheet. Thankfully it's not a case where they are randomly scattered throughout the body.

Maybe there's a way somehow using the Range function? Automatically create range called Unowned or something like that defined as $A$x : $N$343 where x is first row matching, and then sort the range by column A?

Hope all that gobbledy gook makes sense. Ha! Thanks.

~Vol
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,214,605
Messages
6,120,473
Members
448,967
Latest member
visheshkotha

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