+ Reply to Thread
Results 1 to 3 of 3

sum function in excel macro with dynamic range

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    sum function in excel macro with dynamic range

    Forgive me this has been answered before but what I have found in my searching I cannot get to apply to what I have. I seem to run into errors.

    Here is my Code:

    Please Login or Register  to view this content.
    My issue is two fold. Every time I run the 'SUM' Macro with only one expense, I get an error and I do not know how to trap for it. The other issue is that my worksheetfunction.sum only inputs the value of the total and not the =sum function. This is important because the individual can change the amount at any time.

    Thanks for any and all help.

    Regards,

    John

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: sum function in excel macro with dynamic range

    John

    What exactly do you want to sum in the formula?

    Is it from C12 down to the last row of data in that column?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: sum function in excel macro with dynamic range

    hi try this

    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

+ 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