VBA Code for Sorting

soumen21

New Member
Joined
Aug 16, 2019
Messages
29
Dear Experts,

I have a set of data as shown below

Category ANameDue Year
Sam2021
John2020
Tony2024
Rahul2020
Harry2023
Category BBill2021
Tom2022
Steve2020
Alan2024
Walter2021

<tbody>
</tbody>

I want to create tabs with three different colors which will show the list data as per conditions.
Category A Red Yellow Green
Category B Red Yellow Green

When I click on Red tab of Category A, it will list all names with due date 2020 or earlier
When I click on Yellow tab of Category A, it will list all names with due date between 01-01-2021 to 12-31-2023
When I click on Yellow tab of Category A, it will list all names with due date after 01-01-2024

and similarly for Category B.

When I click on Red tab of Category B, it will list all names with due date 2020 or earlier
When I click on Yellow tab of Category B, it will list all names with due date between 01-01-2021 to 12-31-2023
When I click on Yellow tab of Category B, it will list all names with due date after 01-01-2024

Any help?

Regards
Soumen
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,213,558
Messages
6,114,296
Members
448,564
Latest member
ED38

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