Consulting

Results 1 to 5 of 5

Thread: Solved: Add negatives?

  1. #1

    Solved: Add negatives?

    Hi,

    I have a range of cells G43:G48 - each cell has a formula e.g.
    =ROUND(E43*F43,2).

    Is it possible to add only the negative results from these cells in another cell G49?

    Not all the cells are used in every situation in which case I get a #N/A - I have tried to used the IFISERROR function but can't seem to figure it out.

    any help appreciated

    Jon

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    =SUMIF(G43:G48,"<0")
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    Thanks v much - any ideas how to get the =ROUND(E43*F43,2) to include the if(iserror) function so it doesn't return #N/A if no values in E43 and/or F43.

    regards
    Jon

  4. #4
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    It should not error in that circumstance, but the general solution is
    =IF(ISERR(ROUND(E43*F43,2)),"Error",ROUND(E43*F43,2))
    "Error" can be replaced with 0 or "" or any other value/text
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    Ok Thanks again - I had figured it out in the meantime - I got my brackets in the wrong place.

    regards

    Jon

Posting Permissions

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