+ Reply to Thread
Results 1 to 11 of 11

Problem using SUMPRODUCT

  1. #1
    Registered User
    Join Date
    09-25-2013
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2013
    Posts
    7

    Problem using SUMPRODUCT

    Hi all, I have been trying to create a workbook that calculates the cost of documents being supplied. The sliding charging schedule I would be using looks like below:


    Start End Rate
    0 19 1.75 1-19 pages
    20 50 1.45 20-50 pages
    51 and over 1.00 51 or more

    In the attached it works all OK up to 20 pages. In the example I have made all rates $1.00. When I enter 21 documents, it gives the answer as $22.00, when it should be $21.00.

    Any help on what I have done wrong would be greatly appreciated.

    Thanks

    Graeme
    Attached Files Attached Files

  2. #2
    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,929

    Re: Problem using SUMPRODUCT

    Hi and welcome to the forum

    how about just...
    =A2*VLOOKUP(A2,L6:N8,3,1)
    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

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Problem using SUMPRODUCT

    =sumproduct((a2>=l6:l8)*(a2<=m6:m8)*(n6:n8))*a2

  4. #4
    Registered User
    Join Date
    09-25-2013
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Problem using SUMPRODUCT

    Thanks for the prompt reply. Have added that to the example but still can't get it right. I have updated the charge rates to the real rates.

    Using the Vlookup its right up to 19 pages with a total of $33.25. Change the the page total to 20 pages and the result then goes to $29.00, when it should be $34.70.

    Thanks

    Graeme

  5. #5
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: Problem using SUMPRODUCT

    The cell marked in green will give you the final answer.

    Please try this file.
    Attached Files Attached Files
    Last edited by ramananhrm; 09-25-2013 at 02:36 AM.
    Please click 'Add reputation', if my answer helped you.

  6. #6
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Problem using SUMPRODUCT

    Hi nafty..

    provide formula is for threshold calculation..

    please set you data table as below..

    Formula will work fine for you..

    Data Range
    L M N
    5 Start End Rate
    6 0 19 1.75
    7 19 49 -0.30
    8 49 and over -0.45
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  7. #7
    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,929

    Re: Problem using SUMPRODUCT

    OK i see what you want now....

    =IF(A2>19,33.25+VLOOKUP(A2,L6:N8,3,1)*(A2-19),IF(A2>50,33.25+72.5+VLOOKUP(A2,L6:N8,3,1)*(A2-50),VLOOKUP(A2,L6:N8,3,1)*A2))
    (messy, I know, sorry)

  8. #8
    Registered User
    Join Date
    09-25-2013
    Location
    Brisbane Australia
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Problem using SUMPRODUCT

    Thanks all for the great responses. Got it working now.

    Thanks

    Graeme

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Problem using SUMPRODUCT

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  10. #10
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Problem using SUMPRODUCT

    Use this array formula
    =sumproduct((a2>=l6:l8)*(n6:n8)*index(if(a2>=m6:m8,(m6:m8-l6:l8+1),a2-l6:l8+1),0))

  11. #11
    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,929

    Re: Problem using SUMPRODUCT

    Happy to help and thanks for the feedback

+ 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. Sumproduct problem
    By ZeroEcho99 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-15-2013, 11:27 AM
  2. help with div#0 problem with sumproduct
    By jram in forum Excel General
    Replies: 2
    Last Post: 07-06-2009, 05:34 AM
  3. SUMPRODUCT problem
    By LeeHarris in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-31-2006, 05:30 AM
  4. [SOLVED] Sumproduct Problem
    By Biff in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 09-06-2005, 05:05 PM
  5. Sumproduct Problem
    By Andibevan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 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