+ Reply to Thread
Results 1 to 4 of 4

increment

  1. #1
    Registered User
    Join Date
    12-02-2007
    Posts
    27

    increment

    Hi i would like to know how do i increment or add a value when doing a for loop.

    eg. Dim i as interger.

    i = formula for multiple pages.

    so question is: how do i make sure that the value for every page is added to i

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Welcome to the forum.
    Please Login or Register  to view this content.
    Last edited by mikerickson; 12-03-2007 at 02:48 AM.

  3. #3
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    If you want to loop thru all the worksheets in your workbook, adding a specific cell's value to a variable, then a For Each Next loop is probably the best option eg:

    Please Login or Register  to view this content.
    This will add all the values in B4 together.

    Richard

  4. #4
    Registered User
    Join Date
    12-02-2007
    Posts
    27

    increment

    Hey this code might just work..

    but the code is counting one cell per sheet. I would like to count the whole column for example A:A where the cell is a non blank.

    is there a way??..thanks a lot.

+ 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