search multiple worksheets name with common text and process using

M

mango

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.
 
J

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top