+ Reply to Thread
Results 1 to 29 of 29

Need to determine correct charge

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Need to determine correct charge

    Good afternoon,

    I hope that you are all well.

    Please see the attached sample of my raw data. I have a sheet with all the current prices we hold in our system and their price breaks (most have only one price but some have several price breaks). This sheet is static and will not change. On the second page, I will have a list of current forecasted products and their forecasted amount. What I require is for a formula to look up the SKU and the amount and pull through the relevant price. I have tried a few ways but I have failed miserably. The structure of the pricing file is that the price next to the amount is the price they get charged if order up to that amount, anything over that amount goes to the next price break etc. The numbers start from one and don't have an upper limit (in terms of forecast numbers)

    Thank you in advance.
    Attached Files Attached Files
    Last edited by Enigma1985; 01-02-2018 at 12:45 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,800

    Re: Need to determine correct charge

    Could you please add your expected outcomes to the workbook manually to show what you want? Explain the manual calculation.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    Hi,

    Can you clarify how it works, please? For example,
    - what is a price break if there is only one price listed?
    - if a product has two price breaks at 1, what does that mean?
    - if a price break is at 5000 and the forecast is 10000, do you charge 5000 at one price and 5000 at another, or all 10000 at the lower price?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    Thank you for your prompt reply. I have highlighted three examples on the attached. I would like it to find the corresponding code in the price list, then look at the amount ordered and it work out with price break it belongs to and return the corresponding price.
    Attached Files Attached Files

  5. #5
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    I believe you need to have a normal price column and a discounted price column based on the amount ordered.

  6. #6
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    I ideally don't want to go down that route. The first page is a download out of the system, could these parameters not be built into a formula?

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,800

    Re: Need to determine correct charge

    It would help if you could please respond to post #3.

  8. #8
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    Hi,

    Sorry I missed this.

    If there is only one price break, this is charged no matter what,
    if there are two price breaks, both at 1, this is an error and I need to fix this in our order system
    All would be charged at the lower amount.

    I work in a manufacturing plant, the more we make, the cheaper it costs so we charge the customer less.

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    Can you sort the product list on Code and Price break? It will make the formula pretty simple and efficient:
    =B2*VLOOKUP(A2,'Product Prices'!A:C,3)

  10. #10
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    Maybe you can structure it like in the 'Adjusted Prices' sheet?

  11. #11
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    Thank you for your reply.

    This didn't work. It isn't taking into account the price break. It would need to find the SKU and then look at the price break.

  12. #12
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    @Billy,

    Thanks but there is never a set structure that we offer a price break at. Some could have a price break at 23,994 and then another product could be offered 109,000.

  13. #13
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    Maybe try making a table with the discounted rate percentage based on the amount ordered? You can fill the column with every option.

  14. #14
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    Perhaps you can put the SKUs in groups for set discount rates. There needs to be some sort of structure for how a discount is applied otherwise calculations cannot be done.

    How are they derived?

    Also I noticed that the same SKUs have different prices after sorting the columns.

  15. #15
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    This is the full list of prices that are in the system, so they are static. Could it not look up the SKU then if there is only one amount, use that but if there are more than one, select the relevant price?

  16. #16
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    Sure it can be done with Index Match arrays. How would it determine what is relevant between the prices?

  17. #17
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    Perhaps this version
    =IFERROR(B2*IF(COUNTIF('Product Prices'!A:A,A2)=1,VLOOKUP(A2,'Product Prices'!A:C,3,FALSE),LOOKUP(2,1/('Product Prices'!$A$2:$A$5387=A2)/('Product Prices'!$B$2:$B$5387<=B2),'Product Prices'!$C$2:$C$5387)),"")

  18. #18
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    There are different price breaks for the same SKU, As they would get it cheaper if they order larger quantity.

  19. #19
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    I see for the same SKU at quantity 1 on row 14 and 15 after sorting the prices are different. It seems there are errors in the data.

    I think you should have one sheet that has unique SKUs and price for quantity 1 to start with.

    Then on another sheet have price breaks for quantity ordered. Other than that I cannot help you.
    Last edited by Billy Spivy; 01-02-2018 at 11:11 AM.

  20. #20
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    This is an error, I will be doing a cleansing piece separately, there would only be one price for this.

  21. #21
    Banned User!
    Join Date
    09-26-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    607

    Re: Need to determine correct charge

    Don't misunderstand I do want to help. Please clean the data first then structure it so one sheet has the prices for each item. There also has to be a way to determine the discounts. Whether they be forecasted amounts with percentage discounts or however they are derived.

    Getting the correct structure in place will ensure accuracy and ease of use for the future.

  22. #22
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    Sorry, it is difficult to understand tone on messages. I am extremely grateful for your assistance.

    I ideally don't want to go down the route of having to manipulate the data as 'Product Prices' is a direct download from our order processing system and as I have no insight to how the account managers agree pricing with their customers, it would be too time consuming to take out the duplicates and then work out the percentages.

    I've been looking through Google and I keep coming across match and index etc but I can't find a way to use these and incorporate below and above the numbers that I have.

    Thanks again.

    P.S. I am going through the data now to try and remove the duplicates that shouldn't be there.


  23. #23
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    Did you try the revised formula in post #17?

  24. #24
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    Yes but it kept returning 41.60 for the 5th SKU down despite there being 5 different prices. When I changed the quantity, it didn't change either.

  25. #25
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    Did you sort the product data sheet?

    In the example file you sent, there is no data for the 5th SKU.

  26. #26
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    Sorry, yes, I sorted it by SKU and then by quantity - smallest to largest. I have cleansed the data now, please see the attached.
    Attached Files Attached Files

  27. #27
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    So what is wrong with the results specifically?

    What should the result for B4 be, given that you have two price breaks, but both are above the level of the forecast? Should it just use the first one? If so, perhaps this version

    =IFERROR(IF(COUNTIFS('Product Prices'!A:A,A2,'Product Prices'!B:B,"<="&B2)=0,VLOOKUP(A2,'Product Prices'!A:C,3,FALSE),LOOKUP(2,1/('Product Prices'!$A$2:$A$5335=A2)/('Product Prices'!$B$2:$B$5335<=B2),'Product Prices'!$C$2:$C$5335)),"-")
    Last edited by xlnitwit; 01-02-2018 at 12:19 PM.

  28. #28
    Registered User
    Join Date
    09-14-2012
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: Need to determine correct charge

    My god, I think they've got it!!

    Thank you so much for your assistance.

  29. #29
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Need to determine correct charge

    You're welcome. Thanks for the rep.

+ 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 correct formula to determine which cells to format
    By regional1500 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2013, 12:22 AM
  2. [SOLVED] Comparing dates of related items to determine if charge is necessary
    By spudzer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2013, 04:00 PM
  3. Errors Charge
    By rpanuganti in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-06-2013, 07:50 AM
  4. Copy charge code down column until next charge code.
    By Zigmo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2012, 12:58 PM
  5. Trying to have a minimum charge
    By austenvegas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2012, 05:59 PM
  6. vlookup to search for the correct charge
    By moley165 in forum Excel General
    Replies: 1
    Last Post: 04-11-2012, 12:13 PM
  7. Posting a charge at the first of the month
    By bizman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-23-2006, 02:01 PM
  8. [SOLVED] A formula or macro that determine the correct month
    By leitek.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2006, 04:40 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