Dear Forum Colleagues,

I would like to ask you about a specific case linked with VBA/macros for a file I am struggling with.

Let's say I have multiple drop-down lists (created by data validation) on cells A2, A3, A4, and each of them have values to select - "Apples", "Bananas", "Peaches". And the columns B, C, D, and E indicate the stores - "Tesco", "Macromart", "Shellz", "Baymart". The goal is to create a macros that will allow me to hide/unhide the columns indicating the stores based on the drop-down selections.

For instance, apples are sold in Tesco, Shellz and Baymart; Bananas - in Tesco and Macromart; Peaches - in Shellz and Baymart. And when I select apples in any list, columns Tesco, Shellz, Baymart stay unhided, while Macromart column is hidden. The same is with Bananas and peaches, respectively.

I can create the macros using "entire column hidden = true/false" functions, but here is the problem: when I select apples in the cell A2, the entire table is formatted based on the "apple rule" meaning that Macromart column is hidden; but when I select "Bananas" in the cell A3, it just adds Macromart and doesn't hide Shellz and Baymart columns since the sheet is already filtered with the "apple rule".

Is there any way that the entire table is filtered again with any drop-down list selection, not based on the previously filled ones? If possible, by not using the VBA-created buttons to clear the filters.

Your help would be very helpful.

Thank you in advance and best regards,

Vugar