+ Reply to Thread
Results 1 to 13 of 13

Calculate Cumulative Value from 3-Tiered Lookup

  1. #1
    Registered User
    Join Date
    03-01-2022
    Location
    usa
    MS-Off Ver
    2013
    Posts
    5

    Calculate Cumulative Value from 3-Tiered Lookup

    hello

    hope you are doing fine

    please find the below screenshot to understand my requirements

    help.PNG


    so if we take the 26 days for example it means

    8 x 60 = 480
    15 x 120 = 1800
    3 x 200 = 600

    total amount : 2880

    MOD EDIT: I have changed your title for you. Please read the forum rules ASAP.


    2022.xlsx
    Last edited by A___2000; 03-01-2022 at 09:20 AM.

  2. #2
    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,460

    Re: kindly help me creating a formula with my small requirements

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    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.

  3. #3
    Registered User
    Join Date
    03-01-2022
    Location
    usa
    MS-Off Ver
    2013
    Posts
    5

    Re: kindly help me creating a formula with my small requirements

    i am sorry,

    i just attached the workbook In the post

    thanks
    Last edited by A___2000; 03-01-2022 at 09:21 AM.

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    one option

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

  5. #5
    Registered User
    Join Date
    03-01-2022
    Location
    usa
    MS-Off Ver
    2013
    Posts
    5

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    thank you so much,

    its the perfect formula for me


    I added one more row and I couldn't do it myself, can you please help

    workbook for your reference.xlsx

    one more row.PNG
    Last edited by AliGW; 03-02-2022 at 06:18 AM. Reason: PLEASE don't quote unnecessarily!

  6. #6
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    you just need to adjust the multi-row ranges such that they include an additional row of data

    =SUMPRODUCT(--($B$16>=$B$9:$B$12),1+$B$16-($B$9:$B$12),$D$9:$D$12-N(+$D$8:$D$11))

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    Cell D16 formula

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

  8. #8
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    why on earth would you suggest hardwiring the values ?!

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    Pl see file.Column E is used as helper column. you can add any number of rows and can change the value in B16.
    In E2 then copied down

    =IF((B9-$B$9+1)<$B$16,IF(C9-$B$9<=$B$16,(C9-B9+1),($B$16-(B9-$B$9)))*D9,0)

    In D16

    =SUM($E$9:$E$12)
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  10. #10
    Registered User
    Join Date
    03-01-2022
    Location
    usa
    MS-Off Ver
    2013
    Posts
    5

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    Quote Originally Posted by kvsrinivasamurthy View Post
    Pl see file.Column E is used as helper column. you can add any number of rows and can change the value in B16.
    In E2 then copied down

    =IF((B9-$B$9+1)<$B$16,IF(C9-$B$9<=$B$16,(C9-B9+1),($B$16-(B9-$B$9)))*D9,0)

    In D16

    =SUM($E$9:$E$12)
    E is helper column was very useful

    i appreciate the help thanks

  11. #11
    Registered User
    Join Date
    03-01-2022
    Location
    usa
    MS-Off Ver
    2013
    Posts
    5

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    thanks everybody, i have now what i need

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Calculate Cumulative Value from 3-Tiered Lookup

    There is simple formula.
    With helper column E.
    In E2 then copy down

    =MAX(MIN($B$16,C9)-B9+1,0)*D9

    Without helper column. ARRAY formula

    =SUM((IF($C$9:$C$12>$B$16,$B$16,$C$9:$C$12)-IF($B$9:$B$12>$B$16,$B$16,$B$9:$B$12-1))*$D$9:$D$12)

    To enter ARRAY formula
    Copy and paste the formula in cell
    Press F2
    Press Ctrl+Shift+Enter together
    Excel covers the formula with {}.
    Attached Files Attached Files

  13. #13
    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: Calculate Cumulative Value from 3-Tiered Lookup

    Yet another

    =SUMPRODUCT(($B$16>=$B$9:$B$12)*($B$16+1-$B$9:$B$12),$E$9:$E$12)

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

+ 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] Creating Test Scenarios from Requirements
    By leebird in forum Excel General
    Replies: 1
    Last Post: 07-21-2016, 04:17 PM
  2. [SOLVED] Kindly help on Rank Formula
    By L Raju in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2014, 03:16 AM
  3. Kindly give me mentioned formula of IF Funcation
    By Muhammad Shafique in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-08-2014, 07:10 AM
  4. Creating a loop with a small formula
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2014, 11:17 AM
  5. Creating a lookup based on multiple requirements
    By Mumps in forum Excel General
    Replies: 2
    Last Post: 04-16-2011, 12:30 PM
  6. Kindly amend this formula
    By darkhangelsk in forum Excel General
    Replies: 1
    Last Post: 08-28-2009, 01:49 PM
  7. Creating a chart based around certain requirements...
    By Munk in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-05-2009, 08:21 AM

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