Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
DMB
 
Posts: n/a
Default How do I cycle through all of the worksheets

I need to check all of the worksheets to collect and sum contents. Is there a
with method or something along those lines?

WITH worksheets
if a = b then
Total = a1 + a1
end if
end with

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default How do I cycle through all of the worksheets

For Each sh In Activeworkbook.Worksheets
If Range("A1").Value = Range("B1").Value Then
myTotal = myTotal + Range("A1").Value
End If
Next sh

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DMB" wrote in message
...
I need to check all of the worksheets to collect and sum contents. Is

there a
with method or something along those lines?

WITH worksheets
if a = b then
Total = a1 + a1
end if
end with



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 do I cycle through all of the open worksheets? DMB Excel Discussion (Misc queries) 0 January 8th 06 11:24 PM
Worksheets moved or deleted by unknown means! Dan Excel Discussion (Misc queries) 1 December 5th 05 09:52 PM
Duplicate Worksheets mlofton Excel Discussion (Misc queries) 1 September 7th 05 02:58 PM
Changing a Link Mid-way Across Worksheets Frosty Excel Worksheet Functions 0 August 25th 05 12:03 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 05:41 PM.

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"