+ Reply to Thread
Results 1 to 8 of 8

Complex (I think) calculation

  1. #1
    Registered User
    Join Date
    11-09-2016
    Location
    London, England
    MS-Off Ver
    2010/2016
    Posts
    72

    Complex (I think) calculation

    Hi,

    We have a price tool where we add a % margin to our buy price. Sometimes we need to sell something via an industry framework and if we're not on that framework we have to go through a provider that is. These providers charge us for it, usually a %. We send them a particular sheet that they copy the rows from into their own tool and add the %.

    So what I need to be able to calculate is an appropriate reduction on our direct sale price so that when the framework provider adds their % back on, it equals the exact same value as our direct sale price, AND I need this all rounded to 2 decimal places. Because the customer seems our direct sale price and the framework provider price.

    E.g.:

    Unit Buy Price: $99.49
    Our Margin: 5%
    Framework Provider Charge: 2%
    Unit Sale Price: $99.49 + 5% = $104.4645 (which would round to $104.46 with ROUND function)
    Unit Framework Price: $104.46 - ??? = $102.41 (the result also needs to be rounded to 2 decimal places)
    Framework Provider Quote: $102.41 + 2% = $104.4582 (which would round to $104.46 with ROUND function)

    Then, I need the same thing for the total columns. Using the example above but quantity 5:

    Unit Buy Price: $99.49 * 5 = $497.45
    Our Margin: 5%
    Framework Provider Charge: 2%
    Unit Sale Price: $99.49 * 5 + 5% = $522.3225 (which would round to $522.32 with ROUND function)
    Unit Framework Price: $522.32 - ??? = $512.08 (the result also needs to be rounded to 2 decimal places)
    Framework Provider Quote: $512.08 + 2% = $522.3216 (which would round to $522.32 with ROUND function)

    I hope that makes sense!

    Thanks

  2. #2
    Registered User
    Join Date
    11-09-2016
    Location
    London, England
    MS-Off Ver
    2010/2016
    Posts
    72

    Re: Complex (I think) calculation

    I am using VBA to actually write the calculated values into the other sheets rather than using inline formulas in those sheets since we need to break out these other sheets and send to a customer/framework provide, so the main sheet will not be included so the formula references would be broken.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Complex (I think) calculation

    See attached

    Unit Framework Price:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    E=Unit Sales Price
    D=Framework Provider Charge

    You should be able to convert the formula to VBA.
    Attached Files Attached Files
    Last edited by JohnTopley; 03-28-2024 at 03:05 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    11-09-2016
    Location
    London, England
    MS-Off Ver
    2010/2016
    Posts
    72

    Re: Complex (I think) calculation

    Thanks for the quick response. Will have a look a bit later

  5. #5
    Registered User
    Join Date
    11-09-2016
    Location
    London, England
    MS-Off Ver
    2010/2016
    Posts
    72

    Re: Complex (I think) calculation

    There is one minor thing, and I'm not sure how it can be solved.

    When you multiple row 1 by 5 you don't get the same result as row 2 which is already x5. 795.9 vs 795.92.

    H2 formula is E2*5 and I2 formula is G2*5
    H3 formula is E3/5

    So I get it's a rounding issue on unit price vs total price.

    Attachment 865031

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Complex (I think) calculation

    I can't view an attachment but I get the same expected results: post a file please.

    and 795.9 vs 795.92 is not a comparison unless 795.9 =795.90. A display problem ???
    Attached Files Attached Files
    Last edited by JohnTopley; 04-03-2024 at 08:03 AM.

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Complex (I think) calculation

    You also have an invalid attachment we can not access to comment upon. but which answer do you want? you need to probably need to round one of the answers by encasing the formula in a round function

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,855

    Re: Complex (I think) calculation

    I can see the attachment, and it looks like a display issue to me - the final column is not set to show 2 decimal places.

    Does this work?

    https://www.excelforum.com/attachmen...hmentid=865031
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Complex calculation
    By jayrocco in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-21-2022, 05:22 PM
  2. [SOLVED] Complex calculation in excel
    By mehdi_154 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-17-2021, 01:22 PM
  3. Complex Bonus Calculation
    By AZ-XL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-19-2013, 01:30 PM
  4. Excel 2007 : Complex calculation help
    By Betadog in forum Excel General
    Replies: 5
    Last Post: 04-20-2011, 05:06 PM
  5. Complex CSA Calculation
    By NatashaBatsford in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-28-2009, 10:42 AM
  6. Complex If Calculation Help
    By Marcus Gee in forum Excel General
    Replies: 3
    Last Post: 02-26-2008, 07:00 AM
  7. complex calculation
    By wislndixie in forum Excel General
    Replies: 1
    Last Post: 12-06-2007, 03:13 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