+ Reply to Thread
Results 1 to 13 of 13

Need to formulate trigger once a certain value or milestone or threshold has been reached

  1. #1
    Registered User
    Join Date
    08-07-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Need to formulate trigger once a certain value or milestone or threshold has been reached

    Hello all,

    I've stumbled upon a certain problem and have to solve it by using function/formulas. Any help would be greatly appreciated.

    Let's assume, Jack and Mike have a joint account and they deposit their daily earnings everyday. Jack deposit his money ahead of Mike everyday.

    'Who' earns 'What amount' at 'which' day is depicted in the attached spreadsheet.

    Screenshot_2.jpg


    The problem is:
    1) Finding out who broke the 1000, 2000, 3000, 4000 and 5000 milestone/threshold first
    2) Finding out in which days the thresholds have been broken


    That's about it. Thanks a lot in advance!
    Last edited by KaziProttoy; 08-08-2015 at 04:29 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    Please review Rule #2 (titles)
    Ben Van Johnson

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    This seems to work...

    This array formula** entered in H5 and copied down to H9:

    =IF(AND(SUM(C$3:C$22)<G5,SUM(D$3:D$22)<G5),"",IF(SUM(C$3:C$22)<G5,D$2,IF(SUM(D$3:D$22)<G5,C$2,IF(MATCH(TRUE,SUBTOTAL(9,OFFSET(C$3,,,ROW(C$3:C$22)-ROW(C$3)+1))>=G5,0)<=MATCH(TRUE,SUBTOTAL(9,OFFSET(D$3,,,ROW(D$3:D$22)-ROW(D$3)+1))>=G5,0),C$2,D$2))))

    This array formula** entered in I5 and copied down to I9:

    =IF(H5="","",INDEX(B$3:B$22,MATCH(TRUE,SUBTOTAL(9,OFFSET(IF(H5=C$2,C$3,D$3),,,ROW(D$3:D$22)-ROW(D$3)+1))>=G5,0)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  5. #5
    Registered User
    Join Date
    08-07-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    Changed the post title

  6. #6
    Registered User
    Join Date
    08-07-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    Thanks a lot Tony,

    I've copied down your formula in the spreadsheet, and it worked for 1000 and 2000 milestones. But for the others (3000, 4000, 5000), the formula yields no result.

    Don't know why it's doing that

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    In your sample file no one has reached those levels!

    Jack's max level is 2712 and Mike's max level is 2315.

  8. #8
    Registered User
    Join Date
    08-07-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    Oh! I am sorry for the confusion. I should've made my question more clearer.

    As they both deposit their earnings daily into the joint account, the amount in the joint account itself has to cross those thresholds. Not their individual earnings, but their cumulative earning. For example, if I add their earnings manually, I find that 1000 dollar threshold is crossed by the joint account in 'Day 5' and it's because of 'Mike's Contribution'. (As we know, Jack always deposits ahead of Mike daily)

    Days= 1 2 3 4 5
    Jack= 20+500+11+52+95= 678
    Mike= 141+78+65+24+41= 349

    In total, 678+349= 1027, thereby crossing the 1000 dollar threshold.

    So the problems are:

    1) By who's contribution does the Joint Account thresholds are crossed? Who triggers them? In 1000 dollar's case, it's Mike.
    2) On which days they have been crossed? In 1000 dollar's case, it's Day 5.


    Thanks a lot Tony!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    I see.

    Well, that changes things dramatically!

    Let me see if I can come up with something but don't hold your breath.

  10. #10
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Need to formulate trigger once a certain value or milestone or threshold has been reac

    I used several helper columns (15).
    D: Jack's cumulative (earnings) subtotal"=IFERROR(SUM(C$3:C4),C4)"

    F: Mike's cumulative (earnings) subtotal

    G: Cumulative Total "=SUM(D4,F4)"

    H: Jack's current portion of total "=IFERROR(G3+C4,G4)"

    I: Mike's current portion "=H4+E4"

    In J3:S3 find where each crosses the milestones.
    E.g. found where jack crosses 1k with: "=MATCH(1000,CumuTotjack,1)+1), etc

    J4 compares jack/Mike 1k milestones and chooses the smaller:
    "=IF(J$3<>K$3,IF(J$3<K$3,"Jack","Mike"),IF(J$3=K$3,IF(INDEX(JackEarns,J$3-1)<INDEX(MikeEarns,J$3-1),"Jack","Mike")))"

    Corresponding day: "=INDEX(DepDate,MIN(J3:K3))"

    data in J:S is used to fill your summary table.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    OK, the only way I could get this to work was to use a helper column.

    I used column E but you can use any column you want.

    Enter this formula in E3:

    =IFERROR(INDEX(C$3:D$22,INT((ROWS(E$3:E3)+1)/2),MOD(ROWS(E$3:E3)+1,2)+1),0)

    Copy down until you start getting all 0s. I copied down to row 50.

    Enter this array formula** in H5:

    =IF(SUM(C$3:D$22)<G5,"",IF(MOD(MATCH(TRUE,SUBTOTAL(9,OFFSET(E$3,,,ROW(E$3:E$50)-ROW(E$3)+1))>=G5,0),2),C$2,D$2))

    Enter this array formula** in I5:

    =IF(H5="","",INDEX(B$3:B$22,CEILING(MATCH(TRUE,SUBTOTAL(9,OFFSET(E$3,,,ROW(E$3:E$50)-ROW(E$3)+1))>=G5,0)/2,1)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Select H5:I5 and copy down as needed.

  12. #12
    Registered User
    Join Date
    08-07-2015
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    Thanks a lot guys.

    Tony, your solution worked like a charm. And protonLeah, your excel works as well. Thanks a lot for this, I understood the solution in parts.

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: ODD PROBLEM: Reaching a certain value as a milestone

    You're welcome. Thanks for the feedback!

+ 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] Milestone Graph: Fit to used range only!
    By skyping in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-23-2015, 04:06 PM
  2. Milestone Dashboard Calendar
    By Abhijit2011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2013, 11:00 AM
  3. Celebrating another milestone !
    By Fotis1991 in forum The Water Cooler
    Replies: 8
    Last Post: 03-13-2013, 02:53 PM
  4. wohooo...another milestone!
    By FDibbins in forum The Water Cooler
    Replies: 68
    Last Post: 02-14-2013, 02:20 PM
  5. Adding text to the milestone bar
    By SloopJohnB in forum Excel General
    Replies: 2
    Last Post: 10-30-2011, 03:12 PM
  6. Using Excel to Add up milestone payments
    By Madball in forum Excel General
    Replies: 6
    Last Post: 10-02-2007, 07:15 AM

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