Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jul 2006
    Location
    Bangalore, India
    Posts
    180
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Sum for a range that has #N/A cells

    Hi,

    I have an excel report, I have used if condition to give me a #N/A if the cell value is 0. I if SUM the range i get #N/A. Can you please let me know a formula that will SUM excluding the #N/A

    Thanks
    Baiju

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Baniju,

    This works in my tests: =SUMIF(B1:B7,"<>#N/A",B1:B7)
    Attached Files Attached Files
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    2 Star Lounger
    Join Date
    Jul 2006
    Location
    Bangalore, India
    Posts
    180
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi RG,

    Thanks for the formula, its working perfectly. I also want to know if we could you the same logic for AVERAGE.

    Regards
    Baiju

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    =AVERAGE(IF(ISNA(A2:A7),"",A2:A7))
    array-entered with Ctrl+Shift+Enter, for example.
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    2 Star Lounger
    Join Date
    Jul 2006
    Location
    Bangalore, India
    Posts
    180
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks Rory, It works perfectly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •