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

OilEconomist

Active Member
Joined
Dec 26, 2016
Messages
421
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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,962
Messages
6,122,482
Members
449,088
Latest member
Melvetica

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