Best approach to using a filter.

Livin404

Well-known Member
Joined
Jan 7, 2019
Messages
743
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Greetings, I completed a spreadsheet where I extrapolated from a database totals based on tons. These totals are on the same worksheet as the database. On that same database I have a drop down box where I can chose “Contingency”, “Humanitarian”, “Support”, and “All”. The drop down box begins at B2. The Totals from this database begins at K7. I am hoping I can identify totals based on the selection made within that drop down. I’m basically looking for a filter that will still keep my spreadsheet working properly. I’m trying to make it as easy as possible for the user to use a filtering process. I’m thinking a VBA with buttons labeled with the criteria. Thank you.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi Livin404,

Assuming the sheet in question is sheet1, with headers in A1 to L1, the column containing criteria (“Contingency”, “Humanitarian”, “Support”, and “All”) is column B, and your dropdown box resides in Cell C3, then bind following code to a button on worksheet.

VBA Code:
Worksheets("Sheet1").Range("A1:L1").AutoFilter Field:=2, Criteria1:=Range("c3")

hth...
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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