+ Reply to Thread
Results 1 to 9 of 9

How to use minus formula in sumproduct

  1. #1
    Registered User
    Join Date
    10-02-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    How to use minus formula in sumproduct

    Hello All,

    I want to minus negative score from total score. Example:

    Let's take one positive survey will give 100% score and one negative survey gives 0% score. If we get 10 surveys out of which 9 are positive and 1 is negative, so the score will be 90%.

    A11=100%, A12=0%
    B11=9, B12=1

    The formula is =sumproduct(A11:A12*B11:B12)/sum(B11:B12)

    Now I want to remove that one negative survey from the total score of 90% using sumproduct formula. Please help!!

    Attached is the file for better understanding.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: How to use minus formula in sumproduct

    =sumproduct((A11:A12>0)*A11:A12*B11:B12)/sum(B11:B12)

  3. #3
    Registered User
    Join Date
    10-02-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: How to use minus formula in sumproduct

    Not working..getting 90.91%. Should get 100%

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: How to use minus formula in sumproduct

    sorry
    =sumproduct((A11:A12>0)*A11:A12*B11:B12)/sumproduct(--(A11:A12>0);B11:B12)
    Last edited by tim201110; 10-03-2017 at 07:41 AM.

  5. #5
    Registered User
    Join Date
    10-02-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: How to use minus formula in sumproduct

    It is giving formula you are using contains error, so i have corrected as

    =sumproduct((A11:A12>0)*A11:A12*B11:B12)/sumproduct(--(A11:A12>0)*B11:B12)

    But it is still giving me 90%.

    See, we got 10 surveys out of which 9 are positive and 1 is negative.

    positive = 100%, negative = 0%.

    So if i remove 0%(negative survey), the answer should be 100%..please help

  6. #6
    Registered User
    Join Date
    10-02-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: How to use minus formula in sumproduct

    Please check the attached file for clear understanding.

    Let me know if you need any further details.

    Thanks.
    Attached Files Attached Files

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to use minus formula in sumproduct

    i couldn't really picture your formula inside the file because the cell references are different. so when you use:
    =sumproduct(A11:A12*B11:B12)/sum(B11:B12)

    i am guessing this actually refers to L11:M12? not sure why you need a SUMPRODUCT too. will this suffice?
    =L11*M11/(M11-MIN(1,M12))

    or referencing it directly to the data:
    =COUNTIF(C11:C25,1)/(COUNT(C11:C25)-MIN(COUNTIF(C11:C25,0),1))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    Registered User
    Join Date
    10-02-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    30

    Re: How to use minus formula in sumproduct

    You get me started..Thanks for your help!!

    However, I found out the formula.

    =L11*M11/(M11-M12)

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How to use minus formula in sumproduct

    Please do not post duplicate threads, I have closed your other thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] Swits leading minus and put minus infront of numbers without macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2015, 11:40 AM
  2. [SOLVED] Help to amend sumproduct formula to minus depending on entry in another column
    By KELLIS in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-14-2013, 02:15 PM
  3. SUMPRODUCT with ID numbers that has minus signs and using time as an array...
    By excellenthelp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2013, 01:26 PM
  4. [SOLVED] SUMPRODUCT formula to find name/date & value then minus from value in another cell
    By SChapman in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-17-2013, 03:32 AM
  5. [SOLVED] I neeed help on changing a minus figure so it does not show a minus
    By Kirstg in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-24-2012, 11:44 AM
  6. change plus/minus inside a sumproduct function
    By orang in forum Excel General
    Replies: 1
    Last Post: 09-28-2006, 08:54 AM
  7. [SOLVED] CHANGE TRAILING MINUS TO BRACKETS OR PRECEEDING MINUS
    By Socal Analyst looking for help in forum Excel General
    Replies: 2
    Last Post: 05-12-2006, 02:20 PM

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