+ Reply to Thread
Results 1 to 31 of 31

Requesting for a nested formula to allot the amount

  1. #1
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Requesting for a nested formula to allot the amount

    Currently I have multiple people in slab 1 and get the same amount

    Instead, I want,
    If the person is in slab 1 then if it has to look for the rank and then allot the amount between 100000 to 90000
    and if there is no slab 2 then it can allot the slab 2 amount in slab itself

    Eg
    Now we have CCC, IIII and JJJ in slab one and get 10000

    But I need KKKK to get 100000, IIII to get the next amount 9500 or 9000 based on the total numbers in the slab

    FYI, I have 38 members in this list and I am filtering using the Month
    Attached Files Attached Files
    Last edited by anil_kumar2011; 01-12-2022 at 03:57 AM.

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

    Re: Need help with the formula

    You will asked by a moderator to change your title to something which describes what your problem is (as per a Google search).
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Need a suitable formula

    Administrative Note:

    Welcome to the forum. As John has warned you, here is your moderation requirement. Your thread title is still not satisfactory. Read the forum rules.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    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,180

    Re: Need help with the formula

    I need KKKK to get 100000, IIII to get the next amount maybe 9500 or 9000 based on the total numbers in the slab
    "Maybe" is rather vague: you need to show , with sample results, how a "slab" (whatever a slab is!) is allocated.

  5. #5
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Need help with the formula

    The Slab is allocated based on all the set criteria's mentioned to them, and it will have a rank between 1 to 38 (1 being the highest)
    Only if they qualify in the criteria they will in slab 1 to 4 and those who miss will be in slab 5

    So I need the formula to check if they slab 1 to 4 and if it is yes, then check which slab and if two or three getting the same slab then it should look for their rank( Ascending order) and allot the amount.
    Say Slab 1 we have 4 people then slab amount 10k should be divided by 4, respectively the other slabs
    Last edited by anil_kumar2011; 01-12-2022 at 03:40 AM.

  6. #6
    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,728

    Re: Need a suitable formula

    The thread title is still woefully poor and completely generic. It needs to tell us what you are trying to do. Try again, please.
    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.

  7. #7
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Does the title look good..?
    Last edited by anil_kumar2011; 01-12-2022 at 04:04 AM.

  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,728

    Re: Requesting for a nested formula to allot the amount

    Yes, it's OK - thanks. Please don't use vague, generic titles in future.

  9. #9
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Thank you so much

  10. #10
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Need help with the formula

    Any suggestion.?

  11. #11
    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,728

    Re: Requesting for a nested formula to allot the amount

    Please be patient. If someone can help, they will. You may bump your thread tomorrow if you get no help today.

  12. #12
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Sure, thank you.

  13. #13
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Any suggestion on this request.?

  14. #14
    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,180

    Re: Requesting for a nested formula to allot the amount

    Please refer to post #4: show expected (manually calculated) results.

  15. #15
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    If we have 4 people in slab 1
    Rank 1 = 10000
    Rank 2 = 9750
    Rank 3 = 9500
    Rank 4 = 9000

    and if we have 4 people in slab and there is no one in slab 2
    Rank 1 = 10000
    Rank 2 = 9000
    Rank 3 = 8000
    Rank 4 = 7000

  16. #16
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Can anyone please advise.?
    Last edited by anil_kumar2011; 01-14-2022 at 04:12 AM.

  17. #17
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    For the example given in post #1, it seems that the formula for cells H5 and down could be: =IFNA(VLOOKUP(G5,$L$5:$P$9,3+IF(G5=1,SUMPRODUCT((I$5:I$16<I5)*(G$5:G$16=1))),0),0)
    Note that cells O6:P6 contain amounts to be given to the 2nd and 3rd ranked people in slab 1. If those amounts are not correct they may be manually changed.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  18. #18
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Thank you so much JeteMc.

    Is it possible to formulate the slab*amount divided by total in the specific slab and allot based on the rank?
    Also, If there is no one in a specific slab the amount should be assigned from the first slab to the second.

  19. #19
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    As John has asked, please provide us with a manually calculated example so that we will have something on which to base our formulas/code.

  20. #20
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    I did shared that in my thread on 1-13-2022, 01:11 PM

  21. #21
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    (from post #18) Is it possible to formulate the slab*amount divided by total in the specific slab and allot based on the rank?
    Based on the values in post #15 it would seem that the total slab amount of slab 1 is 38,250 if someone is in slab 2.
    If there is no one in slab 2, then the total amount of slab 1 is 34,000.
    Is that correct?

  22. #22
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Let me elaborate it more:

    Slab Amount Range
    1 10000 - 9000
    2 8999 - 7000
    3 6999 - 5000
    4 4999 - 4000

    If we have 4 people in slab 1 and we have 4 in slab 2, the amount allocation should be
    Slab 1 amount allocation
    Rank 1 = 10000
    Rank 2 = 9750
    Rank 3 = 9500
    Rank 4 = 9000

    Slab 2 amount allocation

    Rank 5 = 8499.25
    Rank 6 = 7999.50
    Rank 7 = 7499.75
    Rank 8 = 7000


    and if we have 4 people in slab 1 and there is no one in slab 2, then it should club the amount slab 1 and slab 2 and allot to those 4 and likewise slab 3 and slab 4, If people do not qualify in one slab the previous slab should added with the missing slab amount

    Rank 1 = 10000
    Rank 2 = 9000
    Rank 3 = 8000
    Rank 4 = 7000

    Hope this gives a clear idea

  23. #23
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    L11:N16 are filled manually and represent my understanding of the Slab setup.
    K11:K16 are populated using: =IF(O11=TRUE,MID(L11,6,1)+0,"")
    O11:O15 are populated using: =IF(LEN(L11)>6,AND(COUNTIFS(G$5:G$16,MID(L11,6,1)+0),COUNTIFS(G$5:G$16,RIGHT(L11,1))))
    P11:P16 are populated using: =IF(O11=FALSE,"",COUNTIFS(G$5:G$16,MID(L11,6,1)+0))
    Q11:U16 are populated using: =IF($O11=FALSE,"",IF(Q$10>$P11,"",$M11-($M11-$N11)/($P11-1)*(Q$10-1)))
    H5:H16 are populated using: =IFNA(INDEX(Q$11:U$16,MATCH(G5,K$11:K$16,0),MATCH(J5,Q$10:U$10,0)),"")
    J5:J16 are populated using: =SUMPRODUCT((G$5:G$16=G5)*(I$5:I$16<I5))+1
    Let us know if you have any questions.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Thank you for your reply.
    In O11:O15 are populated using: =IF(LEN(L11)>6,AND(COUNTIFS(G$5:G$16,MID(L11,6,1)+0),COUNTIFS(G$5:G$16,RIGHT(L11,1))))
    P11:P16 are populated using: =IF(O11=FALSE,"",COUNTIFS(G$5:G$16,MID(L11,6,1)+0))

    Why are we considering >6..?

    The slabs that we are considering is only between 1 to 4 and anything >5 means the candidated will not be qualifying .
    Last edited by anil_kumar2011; 01-21-2022 at 10:11 AM.

  25. #25
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Hello,

    I have a team of 38 members, I need to allot the amount hence need the formula to calculate it

    Criteria to consider is Slab and Rank

    Sharing an example with 11 members data

    Firstly need to check the Slab and then the rank

    Eg: If I have 7 people in slab 1, the amount allotment should be based on the top 40% in slab 1 to get 10k and remain 60% in slab 1 should get 8000
    And in slab 4 I have 4 people
    top 40 percent in slab 3 should get 6000
    The remaining 20 percent in slab 3 should get 5000
    rest 20 percent in slab 2 should get 4000

    This should be checked on a monthly basis.

    Attaching a reference file
    Attached Files Attached Files

  26. #26
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    As to post #24 LEN(L11)>6 is counting the number of characters in cell L11, not the number of slabs.
    If there are more than 6 characters then the formula preforms the AND function.
    By the way I found an error with that formula. It should read: =IF(LEN(L11)>6,AND(COUNTIFS(G$5:G$16,MID(L11,6,1)+0),COUNTIFS(G$5:G$16,RIGHT(L11,1))),COUNTIFS(G$5:G$16,RIGHT(L11,1))>0)
    Attached Files Attached Files

  27. #27
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    Added 3 columns.
    Column F is populated using: =SUMPRODUCT((C$2:C$12=C2)*(D$2:D$12<D2))+1
    Column H is populated using: =IF(I3="","",IF(COUNTIFS(C$2:C$12,I3),I3,H2))
    Column P is populated using: =SUMIFS(O$3:O3,H$3:H3,H3)
    Note that the formula in column O is modified to read: =ROUND(M3*$O$2,0)
    Column E is populated using: =INDEX(K$3:K$8,AGGREGATE(15,6,(ROW(K$3:K$8)-ROW(K$2))/(H$3:H$8=C2)/(P$3:P$8>=F2),1))
    Let us know if you have any questions.
    Attached Files Attached Files

  28. #28
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Thanks a lot.

    In column E, Aggregate 15,6 is it the values from column O AND F .?

    Also in Cell P4, the value shows 7, but I'm getting the result 4, could you please recheck that.


    =@INDEX(K$3:K$8,AGGREGATE(15,6,(ROW(K$3:K$8)-ROW(K$2))/(H$3:H$8=C2)/(P$3:P$8>=F2),1))
    aggregator formula in Column E, is not working in the Googlesheet ?
    Last edited by anil_kumar2011; 01-24-2022 at 07:19 AM.

  29. #29
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    Not sure that I understand what is meant by "is it the values from column O AND F".
    The INDEX AGGREGATE formula finds the correct amount in column K based on the values in column H matching the value in column C of that row and the values in column P matching the value in column C of that row.
    The values in column P are cumulative so P4 is the total of the 3 people who receive 10000 and the 4 who receive 8000. the column P values are compared to the values in column F to put the correct values in column E.
    In the future, please inform us if the formulas need to work for google sheets.
    Here is an array formula that does the same thing as the INDEX AGGREGATE formula: =INDEX(K$3:K$8,SMALL(IF(H$3:H$8=C2,IF(P$3:P$8>=F2,ROW(K$3:K$8)-ROW(K$2))),1))
    Let us know if you have any questions.
    Last edited by JeteMc; 01-24-2022 at 10:10 AM. Reason: edited text

  30. #30
    Registered User
    Join Date
    02-15-2018
    Location
    Bangalore
    MS-Off Ver
    2013
    Posts
    36

    Re: Requesting for a nested formula to allot the amount

    Thank you so much for your help.

    My bad, missed to mention about G-sheet.

  31. #31
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Requesting for a nested formula to allot the amount

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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: 3
    Last Post: 03-24-2020, 07:27 AM
  2. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  3. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  4. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  5. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  6. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  7. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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