+ Reply to Thread
Results 1 to 3 of 3

Confused.com... Sumproduct or Sumif???

Hybrid View

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Talking Confused.com... Sumproduct or Sumif???

    Hi all

    I've been trying to work this out for a while, have read n number of posts to try and work this out, but no luck so far.

    I would like to set up a rule whereby I enter a value into a cell and it adds that value to the sum of another cell automatically and where I am then able to punch in another, different value into the original cell, which then adds that value to the sum of the second aforementioned cell and so on...

    So for example I would like to enter the value of 5 into A1 which adds this to the sum of B1 which now equals 5. I would then like to enter 2.5 to A1, which adds this to the sum of B1 which is now 7.5, I would like to repeat this action on a number of different rows and ways, like C15 adding to the sum of A15

    Many thanks in advance,
    Ho-hum (NOVICE!!!!!)

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,050

    Re: Confused.com... Sumproduct or Sumif???

    See this post:

    http://www.excelforum.com/excel-gene...ml#post2497151

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-31-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Confused.com... Sumproduct or Sumif???

    Ok, thank you so far, I can see it worked for the other guy... as I say, (Sorry!) I am a novice. What do I do with this?

    I've added the developer tab to the ribbon. And I've got to the point where I can create a macro. What do I do from this point?

    And, if I wanted to apply this rule to D15 (add a number) to B15 (Sum) would the macro read as follows?

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Columns(2)) Is Nothing Then Exit Sub

    Application.EnableEvents = False
    Range("B15"&Target.Row) = Range("B15"&Target.Row) + Range("D15"&Target.Row)
    Range("D15"&Target.Row) = ""
    Application.EnableEvents = True

    End Sub

    Would I follow this process?
    (Select the cell to which I am to apply this to?)
    Macro
    Macro name "Add"
    Create
    Copy and paste the above macro to that specifc cell?

    I have tried this, it doesn't seem to work. like I say... true novice

    Where am I going wrong? I would like to apply this rule to the columns above an below the rows cited

    Many thanks...
    Last edited by Ho-hum; 03-31-2011 at 05:34 PM. Reason: To add context to my question

+ 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