ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   search multiple worksheets name with common text and process using (https://www.excelbanter.com/excel-worksheet-functions/8218-search-multiple-worksheets-name-common-text-process-using.html)

mango

search multiple worksheets name with common text and process using
 
dear all, hope can help.
i need to process a list of worksheet with the common name.
for example i will search through all the sheets and when found the sheet
name carries "AMT" the vba will process the sheet. they are not in sequence.
can show me the sample in vba?
thanks alot.





Jason Morin

Something like:

Sub WorkAMT()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name Like "*AMT*" Then
<<<your code here
End If
Next
End Sub

---
HTH
Jason
Atlanta, GA

-----Original Message-----
dear all, hope can help.
i need to process a list of worksheet with the common

name.
for example i will search through all the sheets and

when found the sheet
name carries "AMT" the vba will process the sheet. they

are not in sequence.
can show me the sample in vba?
thanks alot.




.



All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com