I have a tiered commission rate based on the number of sales that I cribbed from a couple of Excel Formulas:
Min Max Payout Differential
1 5 $3.00 $3.00
5 $4.00 $1.00
Starts at A1 and ends at D3. Sheet is named Tiered Bonus
On another sheet I have the following program referencing Tiered (row 2):
=IF(ISBLANK($A2),"",SUMPRODUCT(--($K2>'Tiered Bonus'!$A$2:$A$3),--($K2-'Tiered Bonus'!$A$2:$A$3),'Tiered Bonus'!$D$2:$D$3))
Putting 5 in sales, however, yields only $12 when it should yield $16 (4*3)+(1*4). I know there's something obvious that I am missing but I can't see it
First, make sure that A1:D3 is set up this way...
Min Max Payout Differential
0 5 $3.00 $3.00
4 $4.00 $1.00
Then, with K2 containing 5, the following formula will return 16...
=SUMPRODUCT(--($K2>$A$2:$A$3),--($K2-$A$2:$A$3),$D$2:$D$3)
Note that the calculation takes place this way...
(5 - 0) x 3 = 5 x 3 = 15 '$3.00 for anything over 0
(5 - 4) X 1 = 1 x 1 = 1 '$1.00 for anything over 4
Hope this helps!
Related
I have below data set starting in A1:
start tier end tier price
1 5 5
6 7 4
8 10 3
11 111 2
112 1
The usage is in D1 and is equal to 10. I want to calculate the value based on usage and decreasing price. I have got two sumproducts but having no luck.
First one:
=SUMPRODUCT(--($D$1>A2:A6), ($D$1-B2:B6), C2:C6)
Second one:
=SUMPRODUCT(--($D$1>{0,6,8,11,112}),--($D$1-{5,7,10,111,1000}),{5,-1,-1,-1,-1})
Both miscalculate.
I prefer the first one as no hard coding is involved.
It seems to me that you have made a mistake in the #paul's solution comment and the result should be 42 - if the usage is 10 then it divides into 5 * 5, 2 * 4 and 3 * 3.
If I'm right, you can try the following formula:
=SUMPRODUCT(($D$1>=A2:A6)*((B2:B6-A2:A6)+1+($D$1-B2:B6<0)*($D$1-B2:B6))*C2:C6)
Use SUMPRODUCT and LOOKUP:
=SUMPRODUCT(LOOKUP(ROW($ZZ$1:INDEX($ZZ:$ZZ,D1)),{1,6,8,11,112},{5,4,3,2,1}))
With the lookup table:
=SUMPRODUCT(LOOKUP(ROW($ZZ$1:INDEX($ZZ:$ZZ,D1)),A:A,C:C))
Are you sure you want to use SUMPRODUCT for this? RANGELOOKUP might be more suitable.
Given the data:
End Tier Price
0 5
5 4
7 3
10 2
111 1
You can find the price for a quantity (e.g. 18 units) using =VLOOKUP(18,A2:B6,2,TRUE)
I am trying to use the index with match function to give me the order of people based on their rankings. My data is something like this:
A B C
1 Rank Name Score
2
3 1 Joe 100%
4 3 Bob 80%
5 1 John 100%
6 2 Dan 90%
7
8 RankOrder Name
9 1 =index(b3:b6,match(1,a3:a6,-1)) Result = Joe
10 1 =index(b3:b6,match(1&<>"b9",a3:a6,-1)) Result = John **HELP
11 2 =index(b3:b6,match(1&<>"b9&b10",a3:a6,-1)) Result = Dan **HELP
The first formula is to find who has a ranking of 1 or greater, then the second and third formula is where I'm struggling. I need to find who the has the next ranking closest to 1 but has not already been outputted in cell B9. Then the next formula would be the same but not someone that's been outputted in cell B9 & B10. Hopefully this make sense.Thanks!
Use index and aggregate with countif for aggregate's k factor.
=INDEX(B$1:B$6,AGGREGATE(15,6,ROW($3:$6)/(A$3:A$6=A9),COUNTIF(A$9:A9,A9)))
I have a column "Uni"
E.g.
Person Uni Round 1 Round 2 Total Rank
Leia Notts 5 5 10
Hailey Notts 6 5 11
Bobby Bath 8 1 9
James Liverpool 9 1 10
Then another table:
University Total Score Rank
Notts =sum(vlookup(...))
Bath =sum(vlookup(...))
Currently, my formula returns the 'first' lookup of the keyword - e.g. for notts, it returns '10' - rather than looking up the 10 and the 11 and summing them.
How do I make it lookup and sum both values?
My current formula is =sum(vlookup(S7,B$3:Q$40,15,FALSE)) where S7 is "Notts", range, index column 15 is "total score"
There's about 8-10 of each university.
Vlookup only returns one value, you can't sum over that.
Maybe use instead something like
=SUMIF(B$3:B$40,S7,$P3:$P40)
I am building an envelope system where I withdraw a number of bills each pay period and put them into envelopes. What I am trying to do is to determine via formula how many bills of each I need to have. Here is an example:-
My funds would be:
Kids $ 10
Car $ 50
Gas $100
Groceries $225
Gifts $ 40
---------------
Total: $425
What I want is a base formula to extract the number of bills of each of: $1, $5, $10, $20 and $50
How to extract numbers of $50s from this list which should give me 7 [1 Car, 2 Gas, 4 Groceries]?
Ultimate goal should be this:
0 $ 1 bills $ 0
1 $ 5 bills $ 5
1 $10 bills $ 10
3 $20 bills $ 60
7 $50 bills $350
--------------------
Total Cash: $425
UNTESTED. With Kids in A2 and 50,20,10,5,1 in C1:G1 then perhaps in C2 and copied across and down:
=INT(MIN($B2,$B2-SUMPRODUCT($B$1:B$1*$B2:B2))/C$1)
The results might then be summed by column (excluding the labels) to get the count by denomination and each sum multiplied by the column labels (eg =SUM(C2:C10)*C$1) then the sums summed as a cross-check on the total.
Assuming your table is in range A2:B6, I would use some auxiliary cells on its right, like this:
| A | B | C | D | E | F | G |
50 20 10 5 1
Kids 10 0 0 1 0 0
Car 50 1 0 0 0 0
Gas 100 2 0 0 0 0
Groceries 225 4 1 0 1 0
Gifts 40 0 2 0 0 0
These are the formulas in row 2:
C2: =ROUNDDOWN(B2/C$1,0)
D2: =ROUNDDOWN((B2-C2*C$1)/D$1,0)
E2: =ROUNDDOWN((B2-C2*C$1-D2*D$1)/E$1,0)
F2: =ROUNDDOWN((B2-C2*C$1-D2*D$1-E2*E$1)/F$1,0)
G2: =ROUNDDOWN((B2-C2*C$1-D2*D$1-E2*E$1-F2*F$1)/G$1,0)
These formulas could be a bit simpler if you use more auxiliary columns with intermediate results.
Then just copy them to the rows below. Finally, you get the results using a simple SUM per auxiliary bill column, placing them as you like and multiplying those results by the bill value in another column.
One possible way to do this would be to implement the following algorithm:
As in your example we have (a,b,c,d,e,f)=(10,50,100,225,40) as our set of values. For each value run =ROUNDDOWN(a/50,0),=ROUNDDOWN(b/50,0), and so on in a column adjacent to your column of values.
Next, multiply these values by the divisor (in this case 50) and subtract this from the initial amount.
Now run this again in a loop for 10, 5, and 1. That is, run this over the array of divisors (50,10,5,1). You will need three columns for each divisor value, one for the initial use of =ROUNDDOWN(), one for the multiplication, and one for the subtraction. In total then you'll need 12 columns of information.
There is probably a way to implement this in VBA that will cut it down to the three columns of counts you need for each bill type with ease.
I have an Excel table with my banks account like this
A B C E
1 Currency Percent Value Banks Account
2 USD 5 100 8923781
3 Eur 7 200 Ea84382
4 USD 6 900 PayY8908
So I need to calculate how much USD I will earn in current month from all deposits (Value) if we know interest rate's (Percent) for each of bank's acoounts.
For first account the formula will be =C2/100*B2/12 and for second =C4/100*B4/12
The problem that I don't understand how to automatically filter only USD accounts (SUMIF???). And I can't figure out how to do this using only one cell.
You could use SUMIF, if you would use a helper Column:
A B C D E
1 Currency Percent Value Banks Account Monthly earned
2 USD 5 100 8923781 0,416666667
3 Eur 7 200 Ea84382 1,166666667
4 USD 6 900 PayY8908 4,5
Formula in E2:
=C2/100*B2/12
fill down.
Now you could have:
=SUMIF($A$2:$A$10,"USD",$E$2:$E$10)
to sum the USD.
Or, without helper Column, you could use the "swiss army knife" SUMPRODUCT:
=SUMPRODUCT(($A$2:$A$10="USD")*($C$2:$C$10/100*$B$2:$B$10/12))
Greetings
Axel