Results 1 to 6 of 6

Problems with code for keeping running total

Threaded View

  1. #1
    Registered User
    Join Date
    01-12-2013
    Location
    Massachusetts
    MS-Off Ver
    Excel 2007
    Posts
    3

    Problems with code for keeping running total

    Hi All,
    I have a spreadsheet that i have been using and refining since being treasurer for an organization. My term is up and im relinquishing control to someone who is far less capable than i with Excel.
    So im trying to simplify some of the monthly tasks that need to be done when entering data into this spreadsheet.

    I came across this VBA code which allows me to keep a running total of a monthly collected amount.
    When i enter the amount in one cell, it adjusts the total in another.
    Heres is the code:
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
          With Target
             If .Address(False, False) = "B25" Then
                If IsNumeric(.Value) Then
                   Application.EnableEvents = False
                   Range("B26").Value = Range("B26").Value + .Value
                   Application.EnableEvents = True
                End If
             End If
          End With
        End Sub
    The issue im having is that i have created a new sheet for each month of the year and have created ones through 2015 to help keep it simple for the new guy. While the VBA code works well, im not sure how to carry over the total from the prior months sheet to the new months sheet and still keep this code working.
    Im sure there is a way and was hoping someone could help me out with this. Im no Excel guru, so please be gentle

    On another note.
    The work sheets for every month of the year are 46 rows x 5 columns in size with fairly simple formulas.
    The only VBA code is whats posted above. With that said, at what point should i consider creating a new workbook. This current one goes from 2008 to 2015 and thus has approximately 96 sheets.
    Last edited by LOTL; 01-12-2013 at 03:27 PM. Reason: Change Thread Title

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