VBA Code to Sort Based on Multiple Special Criteria (List)

OilEconomist

Active Member
Joined
Dec 26, 2016
Messages
426
Office Version
  1. 2019
Platform
  1. Windows
Thanks in advance for your assistance.

How would I created a VBA code to do a special sort based on the following criteria.

(1) First sort by the values set forth in columns D and E in the given order. Basically the data set with N rows (Range("A3:T" & LastRow)) I want to sort in the following order (two criteria). So first it will gather all data that have red as an entry in column D and circles in column E.
1639212585095.png


Once it sorts based on that, I would then like it to sort within each of those based on
(2) Column D in alphabetic order
(3) Column A based on date.

At the end of the day, I first want it to sort on circles and red (combination) and then within circles and red, sort based on column D and then column A. Then do the same thing with each entry in column E and D.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,217,436
Messages
6,136,613
Members
450,022
Latest member
Joel1122331

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