+ Reply to Thread
Results 1 to 9 of 9

Issue with Formula

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764
    Hi
    YOur modification is not correct. It is a loop where value of "a" changes from 1 to 50 (or whatever the no of sheets you have). cell A1 keeps on accumulating (or totalling) C11 with every cycle adding value from one sheet. Use the original code
    Ravi

  2. #2
    Registered User
    Join Date
    03-20-2007
    MS-Off Ver
    2007
    Posts
    66
    Hi,

    Okay, thanks for that.

    In relation to the the cell range (recap worksheet) that I want to populate it goes from cells C4:C34 Therefore would a modification of the macro be required to pre-populate those cells?

    Thanks

  3. #3
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764
    HI
    try this modified macro
    sub total()
    dim a,b as integer
    Range("A1:A31).clearcontents
    for b =  4 to 34
    for a = 1 to sheets.count
    cells(b-3,1) = cells(b-3,1) + worksheets(a).cells(11,3)
    next a
    next b
    end sub
    Ravi

  4. #4
    Registered User
    Join Date
    03-20-2007
    MS-Off Ver
    2007
    Posts
    66
    Hi,

    Thanks for that; however, I have a syntax error on the following line:

    Range("A1:A31).clearcontents
    Any thoughts?

  5. #5
    Registered User
    Join Date
    03-12-2008
    Posts
    19

    quatations

    youve just missed " mark after the second cell value

+ 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