+ Reply to Thread
Results 1 to 15 of 15

SUM of cells with values coming from a if formula

  1. #1
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    SUM of cells with values coming from a if formula

    Hello to all.

    My question is: how can i sum several cells which have values coming from an if formula.
    Specifying, i have several cells, one for each day, containing an if formula to copy the value of another sheet/cell. The value is considered logical because is the result of the IF clause, but the value is not 0 or 1, itīs the value contained in the other cell.
    My problem is that i want to sum all those cells and the result is always zero, meaning that excel is ignoring the cell's values.
    If you click on the formulas icon the correct result appears but not on the cell itself.

    Can anyone help me?

    Thanks to all.

    Tiago

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: SUM of cells with values coming from a if formula

    You need to share the formula ...
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: SUM of cells with values coming from a if formula

    The formula is: =IF(Encomenda!B1=1;Encomenda!H12;B4). I have 31 cells with this formula, of course with correspondent indexes.
    Encomenda is the name of other sheet. The formula intends to copy the value of a specific cell in the Encomenda sheet, if a specific value (in another Encomenda cell) is met. Otherwise, the value of the actual cell is preserved.
    At this moment i can not sum the values of the 31 cells.

    Thanks.
    Tiago

  4. #4
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: SUM of cells with values coming from a if formula

    The formula is: =IF(Encomenda!B1=1;Encomenda!H12;B4).
    I have 31 cells with this formula, of course with correspondent indexes.
    Encomenda is the name of other sheet. The formula intends to copy the value of a specific cell in the Encomenda sheet, if a specific value (in another Encomenda cell) is met. Otherwise, the value of the actual cell is preserved.
    At this moment i can not sum the values of the 31 cells.

    Thanks.
    Tiago

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: SUM of cells with values coming from a if formula

    When you say:
    Otherwise, the value of the actual cell is preserved.
    do you mean that formula is in cell B4?

  6. #6
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: SUM of cells with values coming from a if formula

    Hi.

    Yes, the formula is on B4, B5, B6 and so on. I know it contains circular references...

    Tiago

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: SUM of cells with values coming from a if formula

    This works for me:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    but you need to set up the number of iterations for circular reference calculations

    Regards, TMS

  8. #8
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: SUM of cells with values coming from a if formula

    Sorry, i'm not following you.
    How can the LEFT and FIND functions help me to convert a logical value into a number?

    Thanks again.

    Tiago

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: SUM of cells with values coming from a if formula

    Sorry, I'm mixing this thread up with another . So, forget that formula, although it does demonstrate that if, for example, the value in H12 was 5,2 it would add the two components together.

    However ...

    An IF statement returns one of two values; the value if the condition (first parameter) is true or the value if the condition is false. Neither value is necessarily a logical value which would be TRUE or FALSE.

    In this case, the Condition is Encomenda!B1=1 and, when it is True, it returns the value in Encomenda!H12. If it is False, the value in the cell (B4) does not change.

    I suggest you post a small sample workbook for us to look at.

    Regards, TMS

  10. #10
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: SUM of cells with values coming from a if formula

    That's it.
    I now send the workbook.
    The question is, why the sum in the ecomarche sheet, line 35, is not being showed up?

    Thanks for you availability.

    Tiago
    Attached Files Attached Files

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: SUM of cells with values coming from a if formula

    There's nothing wrong with the formula in row 35. It is a simple SUM and, if you set the values in the matrix manually, or you manipulate the values being tested so that they have a value to be returned, the SUM will include the value.

    So, for example, if you manually put a value in row 34 (over-riding the formula), you will see the SUM reflect that value. Similarly, look at the formula in cell D4: =IF(Encomenda!B1=1,Encomenda!H14,D4). If you set the value of Encomenda!B1 to be 1, and you put a number/value in cell Encomenda!H14, the value in Encomenda!H14 will be returned.

    I don't really understand the logic behind the formulae or why you need to use circular references, so I can't really advise you.

    All I can say is that, if you enter the appropriate values on the Encomenda sheet and set the right conditions for the IF statement(s) to be evaluated as TRUE, you will get values returned into the matrix.


    Regards, TMS

  12. #12
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: SUM of cells with values coming from a if formula

    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  13. #13
    Registered User
    Join Date
    09-27-2013
    Location
    Aveiro, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: SUM of cells with values coming from a if formula

    Hi.

    Thanks again for your help.
    For now, lets forget the circular references.
    The Encomenda sheet is updated daily. Each row in the other sheets has the values introduced each day in the Encomenda sheets.
    All this logic works, meaning, that the values are copied each day from the Encomenda sheet to all other sheets.
    The problem is that at the end of the month i need to sum the values in the matrix (of each sheet except Encomenda).
    I donīt know if Excel considers that the matrix values are logical, but it does not sum them up.
    If you notice in the workbook i just sent, the first two rows of the Ecomarche sheet have the values 5 (B4 and B5 rows) and the SUM is zero...

    Thanks again.

    Tiago

  14. #14
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: SUM of cells with values coming from a if formula

    The the circular references is the problem
    If I forget the circular references, I forget the problem

    Good luck

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,462

    Re: SUM of cells with values coming from a if formula

    You have 558 cells, all with circular references. I suspect that it may, eventually, calculate your SUMs but it will take a long while.

    Not much I can suggest ... just don't do circular references


    Regards, TMS

+ 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. Need help coming up with a formula
    By Icyblue024 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-23-2012, 04:13 PM
  2. Chart X axis values coming up as black blob
    By joshnathan in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 07-23-2012, 11:47 AM
  3. Values not coming in few cell but coming in rest all cells
    By rashmib in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 11:19 AM
  4. [SOLVED] RE: When I add cells the sum is coming up $0.00
    By Kevin B in forum Excel General
    Replies: 0
    Last Post: 03-24-2006, 03:50 PM
  5. When I add cells the sum is coming up $0.00
    By Mike O in forum Excel General
    Replies: 0
    Last Post: 03-24-2006, 03:50 PM

Tags for this Thread

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