macro for filtering a column which contains certain value

SR_excelhelp

New Member
Joined
Sep 17, 2015
Messages
1
Hi, I am trying to create a budget template and send it out to many people who will filter their country, sector etc , so, I want a button on top , which says if this is equal to XYZ , then filter col A containing XYZ , is there a way to do this , preferable without macro/vba?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
You can create a macro to easily do that, but then you said you dont want to create a macro.

I dont know too much about slicers but maybe that would be another option, but the data would have to be in a pivot table I think to be able to do that.
 
Upvote 0
You can put this code onto a button, but you will need to adapt it to suit your needs:
Code:
Sub Test()
'
' Test Macro
    Selection.AutoFilter
    ActiveSheet.Range("$B$1:$B$15").AutoFilter Field:=1, Criteria1:="XYZ"
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,941
Members
449,480
Latest member
yesitisasport

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