+ Reply to Thread
Results 1 to 8 of 8

Total sold price according to stock price list

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Galway
    MS-Off Ver
    Excel 2007
    Posts
    16

    Total sold price according to stock price list

    I am selling some stuff and trying to make my SELLING SUMMARY in excel. One sheet contains products purchase history with details like:
    • product name,
    • quantity, value,
    • price for 1 piece


    The other sheet contains selling summary log with details like:
    • product name,
    • total sold quantity


    All I want is to write formula which can calculate the product total value according to stock history.

    Example: I have bought 1200 pieces of product "MICRO USB CABLE" 3 times with different prices each times.

    This is the purchase order with details:
    1. 1st time I have bought 500 cables for € 0.60 each
    2. 2nd time I have bought 400 cables for € 0.63 each
    3. 3rd time I have bought 300 cables for € 0.50 each

    AND NOW: I have sold 1000 pieces of product "MICRO USB CABLE". That mean that I have sold 500 cables for € 0.60 each, then 400 cables for € 0.63 each and 100 cables for € 0.50 each. As you see, for 3rd time I just took 100 cables because I have sold only 1000 (not all 1200).

    Now, I can calculate total amount manually with this formula:
    PHP Code: 
    =(500*0.60)+(400*0.63)+(100*0.50
    but how to make it to calculate automatically?

    There is function called
    PHP Code: 
    =SUMPRODUCT() 
    but I am not familiar with that

    For better understand please take a look to this document:
    https://docs.google.com/spreadsheet/...mc&usp=sharing
    (you can edit this document "in fly")

    Any idea?
    Last edited by maniootek; 01-22-2014 at 08:23 PM.

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Total sold price according to stock price list

    Normally you would use
    =SUMPRODUCT(--($B$2:$B$7=G2),$C$2:$C$7*$E$2:$E$7)
    but
    Where this is coming from:
    4.) 100 for €0.92 each (200 left)
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    01-10-2014
    Location
    Galway
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Total sold price according to stock price list

    There was small mistake with product name in purchase history, I just fixed that.
    Can you check it now?

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Total sold price according to stock price list

    This formula should give you desired
    =SUMPRODUCT(--($A$3:$A$7=F3),$B$3:$B$7*$D$3:$D$7)-((SUMIF($A$3:$A$7,F3,$B$3:$B$7)-G3)*LOOKUP(2,1/($A$3:$A$7=F3),$D$3:$D$7))
    It should but for some reason I can not force SUMPRODUCT to multiply some ranges beyond first decimal point
    So it should multiply 250*.83 but it only takes .8.
    Try yourself

  5. #5
    Registered User
    Join Date
    01-10-2014
    Location
    Galway
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Total sold price according to stock price list

    Can you attach an example? This formula doesn't work for me at all, got error

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Total sold price according to stock price list


  7. #7
    Registered User
    Join Date
    01-10-2014
    Location
    Galway
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Total sold price according to stock price list

    I really appreciate your help. However, it doesn't solve my problem because it's not showing exact results (as you mentioned above).

  8. #8
    Registered User
    Join Date
    01-10-2014
    Location
    Galway
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Total sold price according to stock price list

    I created another example (maybe more clearly)
    Sale Report Spreadsheet Demo.xlsx

+ 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. Replies: 3
    Last Post: 01-03-2013, 12:32 AM
  2. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  3. [SOLVED] Stock Check - Excel times 'Quantity' against 'Price' to have one total?
    By Faith Defender in forum Excel General
    Replies: 18
    Last Post: 07-08-2012, 01:40 PM
  4. IF Code help for price list. Price groupings cell allocation.
    By hotwoz in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-23-2010, 03:48 AM
  5. Question abuot creating a price quote from a long price list
    By glennchung in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-02-2009, 03:49 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