VBA code for filtering multiple columns

VadersKid

New Member
Joined
Aug 30, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi all. Like the title suggests, I am looking to establish a VBA code for an Excel workbook or worksheet to be able to filter multiple columns at once.

For example: Based on the image I have provided, how could I filter all the "Yes" or "No" answers for each Quarter all at once. To elaborate, lets say I wanted to see all the "Yes" for Quarters 1 and 2 and all the "No" answers for Quarters 3 and 4. Is this even possible?

Also, is there a way I can apply this to the whole workbook, kind of like a blanket code for the whole workbook/worksheet, or does the code need to be dependent on specific columns? I have large amounts of data to filter from but primarily its the same criteria throughout the book and it would be awesome if I didn't have to apply a code for each column, if that makes sense. Any suggestions would be greatly appreciated.

cookies.PNG
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I don't think that is possible. You would have to put each quarter in its own separate sheet.
 
Upvote 0
Although you can't filter the data in only one column, you can sort the data in only one column so all the Yes's and No's would be together.
 
Upvote 0
That's a bummer. But, I appreciate you taking the time to respond.
 
Upvote 0

Forum statistics

Threads
1,214,399
Messages
6,119,279
Members
448,884
Latest member
chuffman431a

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