I have a large Excel workbook generating accounting bridges for multiple entities and each entity has a tab called "[Entity name] Bridge". I want to be able to create a code that will capture all the "[Entity name] Bridge" tabs in a dynamic array to be used in code that will apply to all. The tricky part is that I want it to remain dynamic if I add/remove entites in the document at a later date e.g. entity count moves from 12 to 13 = array increases in size accordingly.
I know how to create the static array using
For Each ws In ThisWorkbook.Sheets(Array("[Entity name] BRIDGE", "[Entity Name2] Bridge", ... , "[Entity NameN] Bridge"))
but ideally I could use some code that will add the extra Bridge sheet to the array by searching for all tab names with " Bridge" in the name and then collecting them.
Sorry if I'm missing something obvious!