Hello All,
I'd like to get thoughts on the most efficient vba code that will search a row of headers in a sheet and then delete the entire column if it is not equal to a list of values.
For example, in the header row below where there are Football teams, i would like to delete the entire column if the teams are not equal to the Buffalo Bills, New York Jets, and Cleveland Browns.
Let's say that the Buffalo Bills is in cell B2.
Currently I do not have any code because I'm looking for thoughts on the best methods to use in a scenario like this... my actual sheet will have roughly 200 columns, and i only need to keep 14 of them.
As always, any feedback with actual code would be greatly appreciated and I will test and provide feedback... thanks everyone!
I'd like to get thoughts on the most efficient vba code that will search a row of headers in a sheet and then delete the entire column if it is not equal to a list of values.
For example, in the header row below where there are Football teams, i would like to delete the entire column if the teams are not equal to the Buffalo Bills, New York Jets, and Cleveland Browns.
Let's say that the Buffalo Bills is in cell B2.
Currently I do not have any code because I'm looking for thoughts on the best methods to use in a scenario like this... my actual sheet will have roughly 200 columns, and i only need to keep 14 of them.
As always, any feedback with actual code would be greatly appreciated and I will test and provide feedback... thanks everyone!
|
|
|
|
|
|
|
| ||||||||
|
|
|
|
|
|
|
|