+ Reply to Thread
Results 1 to 2 of 2

How do I cycle through all of the worksheets

  1. #1
    DMB
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1