Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
FILTER SHEETS BY NAME
how can a piece of code be run on every sheet whose name that begins with
"buy", in a particular workbook ? Thanks in anticipation Sunil |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
FILTER SHEETS BY NAME
Hi
try something like the following: sub foo() dim wks as worksheet for each wks in activeworkbook.worksheets if lcase(left(wks.name,3))="buy" then msgbox wks.range("A1").value 'your code end if next end sub -- Regards Frank Kabel Frankfurt, Germany SUNIL wrote: how can a piece of code be run on every sheet whose name that begins with "buy", in a particular workbook ? Thanks in anticipation Sunil |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
FILTER SHEETS BY NAME
Try something like
Dim WS As Worksheet For Each WS In ActiveWorkbook.Worksheets If WS.Name Like "Buy*" Then ' do something with WS End If Next WS -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "SUNIL" wrote in message ... how can a piece of code be run on every sheet whose name that begins with "buy", in a particular workbook ? Thanks in anticipation Sunil |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
FILTER SHEETS BY NAME
try this
for each ws in worksheets if left(ws.name,3)="buy" then runmycode next ws -- Don Guillett SalesAid Software "SUNIL" wrote in message ... how can a piece of code be run on every sheet whose name that begins with "buy", in a particular workbook ? Thanks in anticipation Sunil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlink and Filter Data in Multiple Sheets | Excel Discussion (Misc queries) | |||
Filter Across Multiple Sheets | Excel Worksheet Functions | |||
Excel filter over multiple sheets | Excel Worksheet Functions | |||
Retroactive filter between two sheets? | Excel Discussion (Misc queries) | |||
FILTER ONE MULTIPLE SHEETS | Excel Worksheet Functions |