+ Reply to Thread
Results 1 to 5 of 5

Calculating discount amount with respect to hierarchy of additional discounts

  1. #1
    Registered User
    Join Date
    04-25-2011
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    19

    Calculating discount amount with respect to hierarchy of additional discounts

    This request for help may end up requiring VBA, Access, or both, but I figured I would start in this forum and see what pops up.

    I have a large (950k+ records) table of information that contains original amounts along with potential corresponding percentage and amount discounts. I'm trying to find a way to calculate each record's actual discount amount. The tricky part is that there are duplicate records which have more than one discount applied, often with a discount amount and a discount percentage. In these cases, the "first" record's discount is straightforward, but the second discount record's discount amount needs to be factored on the "new" net total. Each record has a numbered field that determines the order in which the discount is applied.

    So ID1 has two records, one with a $5 discount and a second with a 10% discount. Based on their respective discount order field values (1 & 2), the $5 discount is applied first and the 10% discount is applied second. Since ID1 has an original value of $100, the first record's discount amount is $(5) and the second record's discount is $(9.50). In the even their discount order field values were reversed, the first record's discount amount would be $(5) and the second record's discount would be $(10).

    Additionally, there may be cases with more than two discounts, and the discount order field values do not always begin with 1 (however, discounts are always applied from least order value to greatest).

    I've attached an example workbook for clarity and really appreciate any direction that anyone can offer.
    Example.xlsx
    Last edited by acellis9; 09-08-2014 at 10:49 AM.

  2. #2
    Registered User
    Join Date
    04-25-2011
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Calculating discount amount with respect to hierarchy of additional discounts

    Bump - Any ideas?

  3. #3
    Registered User
    Join Date
    04-25-2011
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Calculating discount amount with respect to hierarchy of additional discounts

    Bump

    Should this be in a different sub-forum?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculating discount amount with respect to hierarchy of additional discounts

    The forum is fine. I can't relate your narrative to the workbook you posted.

    So ID1 has two records, ...
    ID1 has 20,000 records

    ... one with a $5 discount and a second with a 10% discount.
    Where do those numbers appear?

    Based on their respective discount order field values (1 & 2)
    (1&2)? What columns are those?

    Since ID1 has an original value of $100 ...
    Where does that appear?
    Last edited by shg; 09-04-2014 at 11:40 AM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Calculating discount amount with respect to hierarchy of additional discounts

    Try this in H2 and copied/dragged down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This assumes that the order of discount is already in your data set, ie, an earlier discount order will appear in your list before the later discount order for the same ID.

    Noticed some errors in testing - ignore the formula originally posted and try this one instead:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by gak67; 09-03-2014 at 08:51 PM.
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

+ 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. [SOLVED] Additional or discount % from other sheet
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-05-2012, 10:53 AM
  2. Excel 2007 : Formula for calculating % discounts
    By Irajen in forum Excel General
    Replies: 6
    Last Post: 04-14-2010, 02:13 PM
  3. Excel 2007 : calculating discounts in different cells
    By anitacc83 in forum Excel General
    Replies: 7
    Last Post: 09-15-2009, 04:50 AM
  4. Calculating discounts within cell
    By emsilva in forum Excel General
    Replies: 1
    Last Post: 10-12-2007, 11:46 AM
  5. Simple Question, Calculating Discounts
    By WebLord in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-17-2006, 03:45 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