VBA code to Filter out cell columns that match words within the selected cell.

FirstTimeExcel1

New Member
Joined
May 12, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello,

Disclaimer: I am mostly new to VBA besides just recently creating the option to select items from a dropdown and then have them displayed as seen in D5, below.

1652384033633.png


From the picture above, I want to be able to use the strings in row 2 (A, B, C, etc... ) and if they match the strings listed in D5 (A, C in this example), then all other columns get hidden. The reason for this is that there is going to be 20 plus vendors when I put them in, so upon data entry I want only the selected Vendors columns to pop up.

Additionally, I assume this is going to be a Macro, which I have not dealt with. Will there be a "button" I can press, after which I'd click on the cell and it would perform the column hiding?

Let me know if I can clarify!

Thanks,
VBANewbie
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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