+ Reply to Thread
Results 1 to 17 of 17

How to find appropriate prices for Items including discount price.

  1. #1
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    How to find appropriate prices for Items including discount price.

    Hi, experts.

    I need to automatically calculate relevant prices for all items via formula in the right column of attached example, to match the discounted total from left column.

    Prices should be only in hundredths 0.00.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to find appropriate prices for Items including discount price.

    Maybe...
    =ROUND(C5*($D$7/($D$6+$D$7)),2)
    in I2, copied down
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    Copied down this formula shows the price only for the first cell C2.
    Replacing C5 with C2
    Please Login or Register  to view this content.
    - does the job,
    but in this case Total sum is not even close to left column's total.
    Last edited by T.I.; 07-22-2018 at 10:19 AM.

  4. #4
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    Hi again,

    I face a very strange situation..
    If we look to all 3 columns there is a difference in prices calculation.
    Actually the prices are the same but in the middle column (marked with red) not correct.
    Could anybody explain me how it happens?
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to find appropriate prices for Items including discount price.

    Rounding errors. Expand all to same no of dps...
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    I see, thank you. Please advise what can be done in this situation? I need prices rounded to 2 decimals only...

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to find appropriate prices for Items including discount price.

    You need to use Solver. (a free add-in that might already be installed on your machine).

    I know nothing about it, but have spent a little time fiddling with it. I converted all values to cents (to enable me to set "integer" as a constraint for the value of the discounted prices. I got some sort of answer that had a variance of 53 cents.

    So, in 15 min, I was able to get something close. Do a bit of reading around....
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    I will try it. Many thanks for your help!

  9. #9
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to find appropriate prices for Items including discount price.

    Running solver from the uploaded file with only two constraints. One that new prices should be equal to or less than the original price and the second that the sum should be equal to the original price - the discount

    solver_set.jpg

    solver only adjusted the price of item 2 from 1.72 to 1.50 so I think that Glenn's idea with having a min price for each item makes sense.

    Alf
    Last edited by Alf; 07-23-2018 at 01:52 PM.

  10. #10
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    Thank you, Alf. I will consider the above.
    Thanks for your help, guys!

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to find appropriate prices for Items including discount price.

    I used a much laarger number of constraints... But I now see that far fewer can be used. I set them (in my ignorance) one cell at a time. Alf has shown me that you can set constraints to ranges of cells...

    With everything priced as cents, they were:

    1. Must be an integer.
    2. Must be > 0.9 times original price
    3. Must be less than 0.95 times the original price.

    With a bit of imagination, you'll be able to devise more specific criteria.
    Attached Images Attached Images

  12. #12
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to find appropriate prices for Items including discount price.

    Personally I think that using solver is an overkill (even if I do like solver). Simple arithmetic should do it quite easily.

    calc_new.jpg

    The formula in G4 shows how the discount price is calculated. And the new price multiplied by the appropriate quantity gives the new cost for each item.

    Alf

    Ps "," is the Scandinavian delimeter
    Last edited by Alf; 07-24-2018 at 08:03 AM.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: How to find appropriate prices for Items including discount price.

    Not sure that I agree entirely... given that the results must be in whole cents....

  14. #14
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    Hi, Alf.
    But in this case we still face a problem with rounding of decimals. All prices have wrong result.
    For example in your formula 2300*1.56 = 3597,76. But actually should be 2300*1.56 = 3588.00.

    In my documentation I can only use rounding to hundredths...
    I found a very primitive solution as a workaround, using ROUNDUP and ROUNDDOWN formulas for each row separately and have difference 0.64 cents
    which is acceptable...
    Attached Files Attached Files

  15. #15
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to find appropriate prices for Items including discount price.

    Adapting Glenn's idea of setting up price as integers and multiplying them with a 100 + relaxing the lover limit of what the new prices go down to solver found a solution.

    How useful that is I don't know as I have no idea of much the prices can be changed.

    Alf
    Attached Files Attached Files
    Last edited by Alf; 07-25-2018 at 12:10 AM.

  16. #16
    Registered User
    Join Date
    06-12-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: How to find appropriate prices for Items including discount price.

    Dear User,

    Please check if the attached table solve your requirements. Actually the figures you want to round off is actually 1.56424251193749. It may appear as 1.56 but if you round off the value will get changed proportionally.
    Attached Files Attached Files

  17. #17
    Forum Contributor
    Join Date
    03-05-2018
    Location
    Tbilisi, Georgia
    MS-Off Ver
    2013, 2016
    Posts
    271

    Re: How to find appropriate prices for Items including discount price.

    Quote Originally Posted by Alf View Post
    Adapting Glenn's idea of setting up price as integers and multiplying them with a 100 + relaxing the lover limit of what the new prices go down to solver found a solution.

    How useful that is I don't know as I have no idea of much he prices can be changed.

    Alf
    Thanks, Alf. I will analyse all information you and Glenn gave me in this thread. It seems in my case the solver is the best solution. But first I need to overcome my conservatism and study it thoroughly.

    Dear User,

    Please check if the attached table solve your requirements. Actually the figures you want to round off is actually 1.56424251193749. It may appear as 1.56 but if you round off the value will get changed proportionally.
    Thank you, Kamal.

+ 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. List price and Discount Manipulator to Get the Target Net price
    By xoblox in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2016, 03:52 PM
  2. Replies: 1
    Last Post: 10-07-2016, 02:16 PM
  3. Price Per Unit in a Table for a Fixed Incremental Price Discount
    By natkoy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-22-2016, 03:51 AM
  4. [SOLVED] Compare 1 price against multiple prices and change the price according to a formula
    By CharlieAziz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-16-2012, 11:05 AM
  5. [SOLVED] Extracting latest prices from a price book with past and present prices
    By benoj2005 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-10-2012, 04:08 AM
  6. Update Prices on price list and ID and add New Items - Multiple Product Lines
    By KNS Brakes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2011, 09:50 AM
  7. Replies: 6
    Last Post: 10-12-2005, 03: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