Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to use a macro that will grab information off
of all the sheets in a book, but not off of 3 sheets that have different info. How do I get it to go sheet by and sheet and then do what I need them to do except skip the 3 sheets that I name. The problem is, is that the other sheets names can change so I can't name any of the sheets except the 3 that need to be skipped. Thanks for you help, David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each sh in sheets
if sh.name<"name1" or sh.name<"name2" or sh.name<"name3" then sh.do your stuff here end if next sh -- Don Guillett SalesAid Software Granite Shoals, TX "david" wrote in message ... I am trying to use a macro that will grab information off of all the sheets in a book, but not off of 3 sheets that have different info. How do I get it to go sheet by and sheet and then do what I need them to do except skip the 3 sheets that I name. The problem is, is that the other sheets names can change so I can't name any of the sheets except the 3 that need to be skipped. Thanks for you help, David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() As written, this will do your stuff on every sheet since you will get a true on every sheet name. Each sheet will statisfy at least two of the conditions. for each sh in sheets if Lcase(sh.name)<"name1" and lcase(sh.name)<"name2" and _ lcase(sh.name)<"name3" then sh.do your stuff here end if next sh is probably what was intended. -- Regards, Tom Ogilvy "Don Guillett" wrote in message ... for each sh in sheets if sh.name<"name1" or sh.name<"name2" or sh.name<"name3" then sh.do your stuff here end if next sh -- Don Guillett SalesAid Software Granite Shoals, TX "david" wrote in message ... I am trying to use a macro that will grab information off of all the sheets in a book, but not off of 3 sheets that have different info. How do I get it to go sheet by and sheet and then do what I need them to do except skip the 3 sheets that I name. The problem is, is that the other sheets names can change so I can't name any of the sheets except the 3 that need to be skipped. Thanks for you help, David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to consolidate all worksheets data into 1 worksheets? | Excel Discussion (Misc queries) | |||
Sum worksheets - w/o updating formula for new worksheets which are | Excel Worksheet Functions | |||
How use info in Excel shared worksheets to create new worksheets | Excel Worksheet Functions | |||
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? | Excel Worksheet Functions | |||
Assigning Cells in worksheets to other data in other worksheets. | Excel Discussion (Misc queries) |