+ Reply to Thread
Results 1 to 2 of 2

Need help with two cell accumulator

  1. #1
    Registered User
    Join Date
    05-12-2006
    Posts
    3

    Need help with two cell accumulator

    Hello,

    I am trying to do a two cell accumulator and I am having trouble getting it to work. It keeps coming back with an circular reference error and it's not adding up when I put in a value. I would like to place a number in say cell C13 and have it add to cell G13. G13 is where I want to keep my running total. I entered a macro in cell G13 that states (=C13+G13) and also I have entered a vba script that states:

    ( Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Target.Column = 1 Then
    Target(1, 2).Value = Target(1, 2).Value + Target.Value
    End If
    End Sub)

    Can someone please help me out with this I am at a total loss! Thanks in advance

    Dawn

  2. #2

    Re: Need help with two cell accumulator

    You are confusing macros and formulas - the formula in G13 is a
    circular reference as it adds it's own value to itself. The sub itself
    is fine from a coding point of view


+ 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