Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Cycle through worksheets and sum

I want to write some VBA to cycle through all worksheets in a workbook and
copies the value 4 cells across from the one that contains "Total" into Row B
of my totals workshets, and also the value in cell D10.

Ideas?

Thanks

Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Cycle through worksheets and sum

To loop through all the worksheets

For Each sh In Activeworkbook.Worksheets
....
Next sh

To find "Total", look at the Find method in VBA help.

To offset by 4 cells, use

Offset(0,4)

The value in D10 can be addressed directly

Range("D10").Value

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"David M C" wrote in message
...
I want to write some VBA to cycle through all worksheets in a workbook and
copies the value 4 cells across from the one that contains "Total" into

Row B
of my totals workshets, and also the value in cell D10.

Ideas?

Thanks

Dave



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
Shortcut key to cycle through worksheets in the same workbook J K Excel Discussion (Misc queries) 6 April 9th 07 07:12 PM
How do I cycle through all of the worksheets DMB Excel Discussion (Misc queries) 1 January 9th 06 12:21 AM
How do I cycle through all of the open worksheets? DMB Excel Discussion (Misc queries) 0 January 8th 06 11:24 PM
Cycle through all worksheets Patrick Simonds Excel Programming 8 December 26th 05 01:46 PM
Cycle thru worksheets in a workbook June Excel Programming 1 July 22nd 04 03:06 PM


All times are GMT +1. The time now is 06:49 AM.

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

About Us

"It's about Microsoft Excel"