VBA to find and list all sheets with specific text, and place the sheet names in range to be used as loop.
I need help to make a few macros please.
The first Macro “FindSheets” is to find and list all the sheet names which have a specific word/text/phrase. Let’s say “BOWCHICAWOWWOW”. Then list them in a table/defined name range “SheetNames1” with the header the text/word to look for. Last place this table into Worksheet “Lists”. Exclude the WS “Lists” from the search. Expanding and reducing the range as needed.
WS ”Lists” Column “O” Row “2 to whatever”
BOWCHICAWOWWOW <<<<< Input word/text into header to search for
Sheet2 <<<<< list with sheet names that have the text
VMS
IMS
Sheet1
FS
Sheet4
Data
The next Macro ”RangeToArray” is to make any range like “SheetNames1” into an Array that can be used in a loop. Macro to be made as a function or sub that can be run from another Macro.Last note.
There will be other ranges to be made like this. Like “SheetNames2”,”Systems”,”Costs” and they each have their own Range and unique search word/phrase. I would like to use Macro “FindSheets” for each of these separately, when the search word is entered.
So when I run Macro ColumnWidths, I can choose a set of column widths, and choose which array to use.
I don’t use VBA often. I have looked for a few days to find a code but all I find are Macros that put the Names into message boxes or you are taken to the Sheet. That is not what I am looking for. Please help. Thank you in advance.
I need help to make a few macros please.
The first Macro “FindSheets” is to find and list all the sheet names which have a specific word/text/phrase. Let’s say “BOWCHICAWOWWOW”. Then list them in a table/defined name range “SheetNames1” with the header the text/word to look for. Last place this table into Worksheet “Lists”. Exclude the WS “Lists” from the search. Expanding and reducing the range as needed.
WS ”Lists” Column “O” Row “2 to whatever”
BOWCHICAWOWWOW <<<<< Input word/text into header to search for
Sheet2 <<<<< list with sheet names that have the text
VMS
IMS
Sheet1
FS
Sheet4
Data
The next Macro ”RangeToArray” is to make any range like “SheetNames1” into an Array that can be used in a loop. Macro to be made as a function or sub that can be run from another Macro.Last note.
There will be other ranges to be made like this. Like “SheetNames2”,”Systems”,”Costs” and they each have their own Range and unique search word/phrase. I would like to use Macro “FindSheets” for each of these separately, when the search word is entered.
So when I run Macro ColumnWidths, I can choose a set of column widths, and choose which array to use.
I don’t use VBA often. I have looked for a few days to find a code but all I find are Macros that put the Names into message boxes or you are taken to the Sheet. That is not what I am looking for. Please help. Thank you in advance.