Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Cycle through worksheets and sum

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David M C - 23 Jan 2006 17:07 GMT
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
Bob Phillips - 23 Jan 2006 18:03 GMT
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)

> 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
[quoted text clipped - 5 lines]
>
> Dave
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.