Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default all worksheets except

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default all worksheets except


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to consolidate all worksheets data into 1 worksheets? Janet L Excel Discussion (Misc queries) 1 April 24th 09 10:49 AM
Sum worksheets - w/o updating formula for new worksheets which are Elgee Excel Worksheet Functions 4 August 15th 08 05:51 PM
How use info in Excel shared worksheets to create new worksheets dkc Excel Worksheet Functions 0 June 28th 07 08:36 PM
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? TS Excel Worksheet Functions 2 December 27th 06 02:49 PM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:15 PM


All times are GMT +1. The time now is 12:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"