+ Reply to Thread
Results 1 to 4 of 4

VBA rookie - want to perform a sum function in a loop

  1. #1
    Forum Contributor
    Join Date
    06-18-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    104

    VBA rookie - want to perform a sum function in a loop

    Assuming I have values in A1:C10 and then again in A12:C22, I want a total at the end of each subset with the click of a button (I realize that the sum function is much more practical, but this what I have been requested to do). This is what I had so far but I know that the formula I have isn't working.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Any help would be great!

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA rookie - want to perform a sum function in a loop

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA rookie - want to perform a sum function in a loop

    Or without a loop:
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-18-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    104

    Re: VBA rookie - want to perform a sum function in a loop

    Thanks, Olly. Just a heads up, the loop worked while the second one did not. The second actually turned all of my values that I wanted into zeros. Not sure why, but the loop worked perfectly. 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)

Similar Threads

  1. Find NPV of a given set of criteria and then perform a loop
    By BoomerSooner2014 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-19-2013, 04:32 PM
  2. How to perform loop with logical function?
    By Beginner Level in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2012, 03:08 AM
  3. Loop through auto-filter list and perform median function
    By brokenm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2011, 02:27 AM
  4. need to perform loop
    By smiso24 in forum Excel General
    Replies: 5
    Last Post: 04-07-2010, 10:12 AM
  5. [SOLVED] perform 1 function, stop, perform different function
    By nastech in forum Excel General
    Replies: 0
    Last Post: 08-22-2006, 07:25 AM

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