• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro for applying filter

I have written a macro for applying filters on certain column.

Now, I want to edit the macro so that i can also add a text as "All" in all the dropdown in "C2 to G2"

Cell "C2" apply filters to column "H"
Cell "D2" apply filters to column "K"
Cell "E2" apply filters to column "L"
Cell "F2" apply filters to column "M"
Cell "G2" apply filters to column "O"

Filters criteria in all cell have been created from Data Validation in "Sheet7"

Now I want to add a functionality wherein it will enable me add a new validation "All"

So for e.g. if I apply filter on Region "Column C" and select Central, then all the accounts of central will be shown, but as soon as apply filter on column D, and select company size as "$1b to $5b", then it will show, central accounts with company size $1b to $5b.

Now I want to add a functionality so that if select "All" in column D, it will show all the accounts of Central.

Please help me with the same.
 

Attachments

  • Updated_Industrial Accounts List_14.02.2018.xlsm
    59.7 KB · Views: 5
Hi, Pls check the attached Sheet
** if you want "All" in "C2 to G2", leave that cell as blank
in the attached sheet i left D2 as Blank that means All
 

Attachments

  • Auto Filters.xlsm
    46.1 KB · Views: 4
Hi Hareesh,

Thank you very much for your quick response. Unfortunately, this is not what i am looking for.

If you see the original spreadsheet I shared.

I just wanted to add a new dropdown in each of the Cloumn as "All"

If I select "All" in column D, then it should remove filters only from column D. Similarly, if in column C, i have applied filters and selected region as "Northeast", then I shud have the flexibility to change the filters in other column.

Its just that along with the existing drop downs I also want to add "All" to, and all will work as removing filter on from the respective column only. It should not remove filters from all the columns
 
Hareesh Thank very much for all your help,

But I would like you to see the first file attached, and then just add "All" to all the cell range, and whenever we select "all", it should filter only the respective column.

And right now you have only selected the range for column H. Hence filter is working only when I am typing anything in column "C", i.e. when i am not typing anything in column "C", its not applying the filter.

In other words, if i dont select or write anything in column C, but i write "More than $5b" in column D, then it should apply filter to column K, similarly it should work for other columns also.


▬▬▬▬▬▬▬▬▬ Mod edit : thread moved to appropriate forum !
 
See attached. Choosing All, or pressing the Delete key in a field will result in that filter being removed.
 

Attachments

  • Chandoo38205Updated_Industrial Accounts List_14.02.2018.xlsm
    58.7 KB · Views: 8
Back
Top