How to Create Macro Buttons for Filters in Excel

preview_player
Показать описание

Learn how to create macro buttons to apply filters on Excel worksheets or Tables.

Applying filters to multiple columns with the filter drop-down menus can be a time consuming process. In this video I explain how to use the macro recorder to create macros for filters, and then add buttons the sheet to run the macros.

This automates the process of applying filters and will save you and your users a ton of time. Especially if you have a large data set with a lot of columns.

Download the Excel file that I use in the video to follow along.

I also explain how to edit/modify the VBA code. The macro recorder creates the VBA code for the AutoFilter method. AutoFilter is used to apply the filters to each column. This code can be complex and confusing, so I've put together the Ultimate Guide to Excel Filters with VBA Macros. This is a comprehensive resource on VBA filters. Here is the link to the series of posts.

FREE Webinar on Macros & VBA:
Right now I'm running my free training workshop on "The 7 Steps to Getting Started with Macros & VBA". It's free to register at the following link:

Additional videos & resources:

00:00 Introduction
00:21 Writing Macros for Filters in Excel
04:37 The AutoFilter Method Explained
Рекомендации по теме
Комментарии
Автор

I wish I would have looked this up a long time ago. Didn't realize how easy it was to create a macro button to do this! Great clear and easy to follow video, thanks!

brianwillcox
Автор

EXCELLENT video, clear explanation well synchronized with the screen share.

SammytheBammy
Автор

I learned something more valuable than the sum of everything I've learned about excel macro in my life. Thank you so much.

recepcelik
Автор

Amazing simplicity in explanation which otherwise seems a lot tougher when explained by others. Great job sir. Keep it up.

samsung
Автор

As with other comments, very clear and easy to follow. Thanks!

Zeidinho
Автор

Just what I was looking for!

If we are getting a new excel file with the same columns but the number of rows is different. If there was a way to copy the button and reuse it in the new sheets it would be even better.

chandrainsky
Автор

Thank you! This was a great explanation!

herrjingjing
Автор

yes good idea to record the Macro and if we have idea about how to understand and change the VBA codes we do more alter in the code, like now i am thinking if we can get during the macro run time message box which can ask the criteria of maximum and minimum cost we can given and it can update our filter data as per given criteria

GoTruth
Автор

thank you very much for such nice explaining. i have 1 question: if I have created a lot of such buttons (because my data is huge) how can i click one after another without a need to clear filter after each clicking? my buttons like filter each other with each next button being clicked. i would appreciate so much your advise. thank you

ninagryshkova
Автор

That was a very helpful video thank you.

jamesmann
Автор

Thank you very much your awesome very good toturial i subscribe and liked your video

rmorales
Автор

Nice, really clear and awesome vide!, I have been strugle with a particular thing, How can I check or unchek multiple values to filter one column from VBA so I can make the buttons for the most frecuent values of that particular column ?

AniManuSCh
Автор

Another awesome tutorial! How would one use the same button to remove or reset the auto filters? One click to activate filter criteria and second click to clear? Thank you.

tannertucker
Автор

Hi Jon, thanks for your video. I have set up 2 macro buttons in a workbook but ideally I'd like to have the filtered data appear in a new sheet tab. Is that possible and how can I go about doing that?

mikachu
Автор

When i click the VB button my macro does not appear in the code under module 1. please help

ElaineMerlin
Автор

nice thank, ini pelajaran yang aku cari - cari

unclenickofficial
Автор

Great Jon!
I used the advanced filter tool in a macro and when my criteria filter was dates (my region dates are formated as day/month/year) the macro did not run. How can I fix the problem to my formated dates???

CarlosSantos-mzkj
Автор

This video is superb but for eg if I use a filter in one column and copy paste the data in another sheet and then go back to the main sheet and set another filter and copy paste /append it second sheet it throws me the VBA Subscript Out of Range Runtime Error (Error 9) how do I fix this?

djmenon
Автор

Hi, do you have a video explanation about a vba button that filters the next option in the drop down?

Pupangela
Автор

could you please guide me on how i create or copy attendance sheet for a particular month and clear it using Macro ?

tophareal