Question:
I have an excel workbook that has sheet names as Countries. Along with those sheets, there are additional sheets that I do not want to process. Hence I am trying to eliminate those sheets and keep only the sheets where sheet names are country names.Below is the code I am using and it is getting the job done:
Answer:
It seems fine what you have in my opinion. Another option is to check for each sheet name if this name contains one of your words. If not, keep it in a list:If you have better answer, please add a comment about this, thank you!