+ Reply to Thread
Results 1 to 5 of 5

Formula for different layers based on criteria

  1. #1
    Registered User
    Join Date
    03-18-2014
    Location
    Brampton, ONTARIO
    MS-Off Ver
    Excel 365
    Posts
    78

    Formula for different layers based on criteria

    Hello,

    I need help with a formula.
    I have to come up with a formula which can assign one amount to different layers based on the criteria.
    For example the amount is 4,350,0000 and first layer should have only up to 1 million, then second layer is next 500,000, 3rd layer next 500,000 and 4th layer 500,000, 5th layer 500,000, 6th layer 500,000 and 7th layer 850,000. I have attached a sheet.

    Regards,
    Jai
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Formula for different layers based on criteria

    Try

    Your amount in H11

    H12 =IF(H$11>1000000,1000000,H$11)
    H13 =IF(H$11> SUM(H$12:H12)+500000,500000,H$11-SUM(H$12:H12))
    H14 =IF(H$11> SUM(H$12:H14)+500000,500000,H$11-SUM(H$12:H13))
    H15 =IF(H$11> SUM(H$12:H15)+500000,500000,H$11-SUM(H$12:H14))
    H16 =IF(H$11> SUM(H$12:H15)+500000,500000,H$11-SUM(H$12:H15))
    H17 =IF(H$11> SUM(H$12:H16)+500000,500000,H$11-SUM(H$12:H16))
    H18 =H$11-SUM(H$12:H17)
    Martin

  3. #3
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Formula for different layers based on criteria

    Changed the Amount column (C) to have numbers so they can be used in the formula. Rest is by custom format.
    There are 2 formulas:
    1 for the first layer calculating the smallest of the Total Amount and the layer amount and
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    1 for the other layers
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    See attached workbook.
    Attached Files Attached Files
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  4. #4
    Registered User
    Join Date
    03-18-2014
    Location
    Brampton, ONTARIO
    MS-Off Ver
    Excel 365
    Posts
    78

    Re: Formula for different layers based on criteria

    Thanks a lot!

  5. #5
    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,152

    Re: Formula for different layers based on criteria

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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: 5
    Last Post: 04-12-2016, 11:30 PM
  2. [SOLVED] Populate data based on several layers of criteria
    By punter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2014, 02:45 PM
  3. Replies: 0
    Last Post: 03-28-2013, 02:35 PM
  4. [SOLVED] subtotals with multiple layers
    By plamb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-25-2013, 02:20 PM
  5. [SOLVED] Does thils IF statement have too many layers?
    By garysallred in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-26-2012, 01:30 PM
  6. [SOLVED] Does this IF statement have to many layers?
    By garysallred in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2012, 08:34 PM
  7. VBA Code for Visio layers
    By arisgr0 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2011, 01:51 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