+ Reply to Thread
Results 1 to 5 of 5

Problem with summing IF functions (not SUMIF)

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Problem with summing IF functions (not SUMIF)

    Hi,

    what I would like to do, is to somehow sum all this values = (A1/$A$8)*B1 if C3 is "B".... If I would have only 7 values (like it this example - A1:A7) then I could simply use =IF(C1="B",(A1/A8)*B1,"")+IF(C2="B", (A2/A8)*B2... But the problem is that my sheet has more then 50 rows.

    I've attached example worksheet.Book1.xlsx

    Any help would be appreciated.
    Last edited by Jovica; 08-30-2012 at 06:42 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Problem with summing IF functions (not SUMIF)

    =SUMPRODUCT(--(C1:C7="B"),A1:A7,B1:B7)/A8
    oughta do it
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Problem with summing IF functions (not SUMIF)

    Thank you so much, it works.
    Could you please explain to me what "--" after sumproduct does.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Problem with summing IF functions (not SUMIF)

    it converts true and false values into 1 and 0 which the sp formula then uses in its multiplication
    good explanation here: http://www.xldynamic.com/source/xld....T.html#explain

  5. #5
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Problem with summing IF functions (not SUMIF)

    Thank you.

+ 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