I am tracking the progress of students reading books in class. For the number of books they read they get a reward. It is not 1 book = prize, 2 books = prize. Instead there are dead spaces along the way, for example there is no reward for books 3 and 4 but there is for 5 books. I want to be able to input the number of books each student read and have it update as to what the next reward will be. For example:
List one
Name Books Next Tier Prize
Sally 4 5 Candy Store
Luke 1 2 Extra coloring time
Jane 8 10 10 Extra minutes on the playground
And so on
The table for rewards would be
Books Prize
1 Ribbon
2 Extra coloring time
5 Candy Store
7 Prize bucket
10 10 Extra minutes on the playground
And so on
This is just an abbreviated list and I have used if then statements previously. However the previous list that had 18 values was cumbersome as it was, the new list has 35 values.
I have used if/then statements in the past in combination with vlookup, but with the increased number of values, it just seemed daunting. I could still use an if statement but was hoping there would be an easier way.
Put this in C2 and copy over and down:
=INDEX(F$2:F$6,IFERROR(MATCH($B2,$F$2:$F$6),0)+1)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 months ago.
Improve this question
I have the following input data:
Contamination
10%
10%
20%
20%
30%
30%
Estimator
Trial 1
Trial 2
Trial 1
Trial 2
Trial 1
Trial 2
OLA
500
75
100
430
460
230
PWA
360
457
400
200
200
400
CA
470
270
450
250
350
150
HA
215
310
200
400
400
200
AM
300
500
315
200
500
250
Table has 5 different estimators each having 2 repeated trials for each of the 3 groups of percentages of contaminations (10%, 20%, and 30%) considered.
For each of the 5 estimators (in my real problem I have more than 5), I want to rank (from lower to highest value) among the trials within each group of percentages (in my real problem I have more than 3) simultaneously.
I am looking for a solution, that doesn't require manually to rank each group, since in my real problem I have a larger group of percentages, trials per group and experiments. The number of trials within each group are the same.
I want to get a formula that can rank it simultaneously. Here is the expected output from the input data sample:
Contamination
10%
10%
20%
20%
30%
30%
Estimator
Trial 1
Trial 2
Trial 1
Trial 2
Trial 1
Trial 2
OLA
2
1
1
2
2
1
PWA
1
2
2
1
1
2
CA
2
1
2
1
2
1
HA
1
2
1
2
2
1
AM
1
2
2
1
2
1
Notes:
I have an older version of Excel: Microsoft Office Professional Plus 2016, please consider that in your answer
The Contamination is the same within the trial set (Trial 1, Trial 2). Table Markdown feature doesn't allow to merge cells, that is why the percentage is repeated
I assume from your question:
I do not want to rank them individually as it will take much time
since I have more than 50 of them to rank
You are referring to the percentage groups and/or number of trials that can be large, which is the most difficult task to expand.
In the cell L3(see screenshot below) I put the first formula that can be expanded vertically and horizontally. Please pay attention to the $ mark to ensure it works in both directions.
=RANK(OFFSET($C3,0, L$2*$J$2 + L$1),
OFFSET($C3,0, L$2*$J$2,1,$J$2),1)
Using named ranges, for example naming $J$2 as totalTrials it is easier to understand the formula:
=RANK(OFFSET($C3,0, L$2*$totalTrials + L$1),
OFFSET($C3,0, L$2*totalTrials,1,totalTrials),1)
or even better, using the modern LET function to define all the variables first, is the easiest way to read it:
=LET(startCell,$C3, totalTrials,$J$2,
groupCnt, L$2*totalTrials, trialCnt,L$1,
RANK(OFFSET(startCell,0, groupCnt + trialCnt),
OFFSET(startCell,0, groupCnt,1,totalTrials),1)
)
and here is the output:
Changing the values of Trial per Group (J2) or # Groups (J4) and expanding the formula horizontally and vertically you can consider a large number of trials within the group, large number of groups and a large number of experiments.
Explanation
For doing the ranking per experiment within the group I use the RANK(number,ref,order). For jumping from one group to another and getting the specific trial within the group, the OFFSET(reference, rows, cols, height, width) function. (check this link for more information about OFFSET function).
For building the recurrence in the formula I use the following two helper rows:
L1:Q1: The trial number within the group, starting from zero, via the following formula: MOD((COLUMNS($A$1:A1)-1),$J$2). It generates the sequence: 0,1,2,...N, 0,1,2,..N, where N is the number of trials minus one (easier to start from zero for the recurrence). In the sample the number of trials is indicated in the cell: J2.
L2:Q2: The group number, starting from zero, that each trial belongs to via the following formula: INT((COLUMNS($A$1:A1)-1)/($J$2)). It generates the sequence: 0,0,0,..0, 1,1,1,..1,...M,M,M...M, where each number is repeated as many times as trials we have where M is the number of groups minus one.
Note: There is a more concise way for building such sequences in modern excel versions via SEQUENCE but you indicated you have an older version.
In order to generate both sequences, I took the idea from here: Excel Magic Trick 692: More About Incrementing Numbers In Formulas (that works for older excel versions)
Combining properly both helper rows in OFFSET, the rank is calculated per trial per experiment.
This explanatory picture from ExcelJet, helps to understand each input argument of the OFFSET function:
I was planning on referring to the solver function for this, but I'm not sure that it is suitable for the problem I have at hands. Let me try to explain as clearly and concisely as possible the situation:
I am going to market to buy (say 100 as in the spreadsheet) fruitbowls.
I have 3 bags that I want to split them into according to a specific breakdown 75% in bag 1, 20% into bag 2, and the remaining 5% into bag 3
The key question I have is to do with the allocation into these 3 bags, which should meet the following 3 conditions:
The average price of the bowls in each bag should be exactly the same. I.e. as in the example spreadsheet the overall price is 104.55 paid. So the average price of the bowls in each of the 3 buckets should be as close to this number, and the same across all 3
The number of bowls in each bucket meets my target split (i.e. 75/20/5 split)
Only whole numbers of bowls exist in each bag, and any 0.5 get rounded up to 1
The final output should tell me how many of each bowl at each price should be included in each bag. (e.g. Bag1: 3 at 105, 1 at 110, and 10 at 109, and so on)
I have included a screenshot below of how the idea above starts.
Any help would be greatly appreciated.
Edit: Gentle bump as I'd still like to solve this task.
I am trying to find a formula that will represent the best prize from my prizes list.
I have two different variables for each prize:
1. How many people want that prize
2. The amount of money that each of the people who wanted the prize was want to invest in the prize.
For example:
1. 6 people invests 4 coins each for the prize.
2. 4 people invests 6 coins each for the prize.
In my opinion the amount of peoples have more wight than the money invested.
Is there any formula for this calculation.
Thank
how about
=A2^2*B2
it will emphasize "crowded" options
so 10 persons, 4 coins will be equal to 2 persons, 100 coins or 4 persons 25 coins or 5 persons 16 coins etc.
You need 100 lbs of bird feed. John's bag can carry 15 lbs and Mark's bag can carry 25 lbs. Both guys have to contribute exactly the same total amount each. What's the lowest number of trips each will have to take?
I have calculated this using systems of equations.
15x + 25y = 100
15x - 25y = 0
This equals out to:
John would have 3.33 trips and Mark would have 2 trips. Only one problem: you can't have 1/3 of a trip.
The correct answers is:
John would take 5 trips (75 lbs) and Mark would take 3 trips (75 lbs).
How do you calculate this? Is there an excel formula which can do both layers of this?
Assuming you put the total bird feed required in A1 and John's and Mark's bag limits in B1 and B2 respectively, then this formula in C1:
=MATCH(TRUE,INDEX(2*ROW(INDIRECT("1:100"))*LCM($B$1:$B$2)>=$A$1,,),0)*LCM($B$1:$B$2)/B1
will give the lowest number of trips required of John. Copying this formula down to C2 will give the equivalent result for Mark.
Note that the 100 in the part:
ROW(INDIRECT("1:100"))
was arbitrarily chosen and will give correct results providing neither John nor Mark is required to make more than twice that number of trips, i.e. 200. Obviously you can amend this value if you feel it necessary (up to a theoretical limit of 2^20).
Regards
Since John and Mark need to carry the same total amount of bird feed, what they will carry has to be a multiple of the least common multiple.
Since they both carry that amount the total amount will always be an even multiple of the LCM.
So find the least even multiple of the LCM that is larger than 100. And calculate the number of trips John and Mark will have to take from that.
For John:
CEILING(100/(2*LCM(15; 25));1)*LCM(15;25)/15
For Mark:
CEILING(100/(2*LCM(15; 25));1)*LCM(15;25)/25