Hello,
I have the following code
The outer for loop looks up the sheet name in the range tabs ( a column list - same for every file, a master list of sheets that each file must possess).![]()
Please Login or Register to view this content.
If it fails to find a match here, the nested for loop looks for a match in another range "extractedtabs" (a horizontal list, distinct for each file, mainly sheets in addition to above sheets, this list is derived from a set of source files with another macro, corresponding to every file i will run this macro on).
Now if both checks fail, then the sheet must be renamed.
I think the checking part in my code is ok, just stuck at the renaming part.
The tricky part for me is how to utilize both the ranges to decide the name to use.
This how the ranges are set up :
Follwing is an example of the ranges:![]()
Please Login or Register to view this content.
extractedtabs looks like this - file name followed by sheets it contains
FileA GK DEF MID ATT
FileB LW RW CAM
FileC ST GK
FileD CB LB CDM CM
Range "tabs" like this
TABS
Italy
Germany
Spain
Portugal
Please let me know if i am unclear and more info is needed.
Thanks for all your help!!
Bookmarks