Hello,
I've got a worksheet with 300+ columns (they are the field names from a database). This sheet is only used to build reference lists from each column. However, to keep the sheet easier to be used, I want to hide the columns that are currently not needed (but I don't want to delete the column). It should be noted that these columns are NOT in one contiguous large group, but are spread out through the whole sheet).

The worksheet is called REFDATASHT as its code name, "REF" as its visible name.
I have Column A in said sheet that is a list of all the columns that I want to hide.

I've thought about populating an array with the list from Col A, and the look through the headers of the entire worksheet, and then hide that column if found.

I'm mostly wondering if someone knows of a more efficient way to do this, here's a pseudo flow of how I'd do this:
Populate an Array of Column A's values (excluding the header)
Find how many columns there are total to search
loop through the columns starting at Col B,
If the header name exists in the Array list, hide it.
if not, finish loop.
Id likely set this to run when that sheet is visible or takes focus.

Is there a more efficient way to do this?