+ Reply to Thread
Results 1 to 11 of 11

SUM function macro

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    SUM function macro

    Hi Guys,

    I am using the following code to get an automatic sum, and it's working great!

    However, Column M has some #NA values and thus my returning sum is #NA.

    Is there a way to modify the macro in such a way that it either ignores the #NA or make it equal to 0?


    Please Login or Register  to view this content.
    thanks for your help!
    Last edited by nawGo; 03-07-2014 at 05:17 PM.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: SUM function macro

    try this

    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: SUM function macro

    Hi Ernest,
    Thanks however, it's not working as I am just getting "-" for the total sum!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: SUM function macro

    Your title said macro, your question is about macros, but you posted in the general forum? I will move it to the VBA forum for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: SUM function macro

    I beleive that should have worked....can you upload a small portion of the file so I can see what is going on?

  6. #6
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: SUM function macro

    Hi Ernest,


    Attached is a sample excel sheet. Let me know what I am doing wrong, Thanks!
    Attached Files Attached Files

  7. #7
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: SUM function macro

    give this a try

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: SUM function macro

    Thankss!! :d

  9. #9
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: SUM function macro

    Glad I could ....sorry I pointed you in the wrong direction to start....thanks for the rep point...have a great day

  10. #10
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: SUM function macro

    not to mention and you deserved it!

    Have a good weekend!

  11. #11
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: SUM function macro

    thanks...you too

+ 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. Using the Find Function inside the Right function in macro
    By namruht in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2013, 02:12 PM
  2. Macro exits prematurely from function after calling other function
    By LouisPhilippe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 03:22 AM
  3. [SOLVED] Help : Macro Function - unable to apply filter function after macro the file.
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2013, 12:50 AM
  4. Macro function Get Comment Text function with format
    By guynextdoor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-28-2010, 01:08 AM
  5. Macro Function:create a new function
    By Tomas in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-09-2006, 07:55 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