+ Reply to Thread
Results 1 to 5 of 5

Summing cells where one has a formula

  1. #1
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Summing cells where one has a formula

    I am attempting to use the if function that looks at a cell to see if it is a certain value and if so it adds the value of the cell above with another cell.

    Here is the formula in cell AH26: =IF(G26=Variables!$F$4,AH25+AF26,AH25)

    the problem is if the G25 did not equal Variables!F4 then AH25 is basically zero or the formula so when cell G26 does equal Variables!F4 then AH26 is supposed to sum AH25 with AF26 but AH25 cell's contents are a formula. How do I get it to ignore the formula and add AF26 with zero instead of the formula?
    Last edited by jacko311; 12-27-2009 at 09:12 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Summing cells where one has a formula

    Hi jacko311,

    Your description appears to ask for this:

    Please Login or Register  to view this content.
    If this isn't what you're looking for, then please re-state the problem.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Summing cells where one has a formula

    No that is not correct: the formula is AH26: =IF(G26=Variables!$F$4,AH25+AF26,AH25)

    the problem is that if AH25 did not return a true statement and fill the cell with a number then the result is #Value!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Summing cells where one has a formula

    Try using SUM, i.e.

    =IF(G26=Variables!$F$4,SUM(AH25,AF26),AH25)

  5. #5
    Registered User
    Join Date
    04-07-2009
    Location
    Lakewood, Wa
    MS-Off Ver
    Excel 2007
    Posts
    39

    Thumbs up Re: Summing cells where one has a formula

    that was it, thanks very much for your help!

+ 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