price calculations weighted values - excel

After a bit of advice on doing a calculator with a sliding scale.
I am building a matrix where we have set price points at intervals based on qty of items. The code I use works fine apart from the first 2 ranges.
Because for 1 qty the unit cost is so high my maths won't work.
Example
Qty 1 = £23.25 (Price per unit is then £23.25)
Qty 10 = £51.59 (Price per unit is then £5.159)
I then have further quantity's that work out correctly.
What I need to be able to do is some sort of weighted value, for 2 off the unit price needs to be near the £20 a unit mark, then 3 off less etc until I get to 10 off # £5.159 a unit.
(It costs more for lesser quantity's, we want to encourage more qty)
Has anyone implemented something like this? From 10 qty onwards the calculation is fine as the unit cost changes are not much at all.
Thanks

Assuming you have quantities form 1 to 10, in column A, put 23.25 in B1 and 51.59 in B10, then the following formula in B2:
=B1+(B$10-B$1)/9
And populate down to B9
in C1 use the following formula:
=B1/A1
and populate down. Final result should look like this:

You could use vlookup with a table as so:

Related

Doing an operation before SUMIF or MATCH-ing multiple values to multiply before summing

I have an Excel document with multiple small tables in it. Here, each table describes a single project, and at the end of the worksheet, I want to create a summary that doesn't have "hardcoded" locations so that that when the amount of projects (tables) is adjusted, it doesn't break all the formulas. Basically, it looks like this:
A B
1 Project 1
2 Units 200
3 Price / Unit 10
4 Material / Unit 5
5 Handling / Unit 1
6 Total cost 6
7 Profit Margin / Unit 4
8
9 Project 2
10 Units 100
11 Price / Unit 5
12 Material / Unit 1
13 Handling / Unit 1
14 Total cost 2
15 Profit Margin / Unit 3
16
...
19 Summary
20 Units =SUMIF( A$1:A19 ; A20 ; B$1:B19 )
21 Material costs ???
22 Handling costs ???
23 Total Profit ???
Here, there may be an arbitrary amount of projects and I'm unsure how to create a formula that directly calculates the total material costs (and by the same pattern, Handling and Total Profit). For the total units, I can simply use a =SUMIF( A$1:A19 ; A20 ; B$1:B19 ) instead of =B2 + B2 by having the function search col A for the keyword "Units" but in order to do this for the total material costs, I need to multiply first. Eg, it would be =B2*B4 + B10*B12.
My first idea was to use an INDEX MATCH approach to extract a subarray from each table and then sum it all up using SUMPRODUCT however the MATCH function unfortunately only returns the first result and I can't get it to output an array of results (I think this is just a limitation with the function?).
I guess it would also be possible to simply add extra lines to each table to pre-calculate these products, but I don't like that solution as it would give the tables a lot of unnecessary extra bloat and I'd really like to solve this in one formula.
Any help would be greatly appreciated!
I came up with a dirty solution, using SUMPRODUCT formula that works if your using Office 365 :
example calculating total handling cost:
=SUMPRODUCT(FILTER(B:B,A:A="Units"),FILTER(B:B,A:A="Handling / Unit"))
FILTER(B:B,A:A="Units"), returns an array of values on the right of cells containing "Unit"
FILTER(B:B,A:A="Handling / Unit"), returns an array of values on the right of cells containing "Handling / Unit"

How can I give discount to the highest priced product

enter image description hereI am trying to figure out how I can solve the following problem in Excel.
First "buis" with the highest "contract tarief" should cost 100% of the "contract tarief" price. The following highest "buis" should cost 50% of the "contract tarief price" all the other "buizen" will cost 25% of the mentioned "contract tarief" price.
For example 6 "buizen" in total 2 of 200mm 1 of 150mm 1 of 125mm and 2 of 100mm. Normally that would cost 8 + 3 + 2 ++ 2 = 15. But the first "highest price one" is 200mm that one will be 4 and the next 2 the rest will be 25% so 25% of 11. And that will be the total price.
So I am trying to make it automated that it automaticly finds the 2 highest costing "buizen" and calculate that they cost 1x100% and 1x50% and then totalling all of the rest "buizen" with the 25% cost.
I hope I make sense. I am from the Netherlands so please ask if you need more clarification. I appreciate your help.
I don't know the layout of your spreadsheet, but;
if column A is your price and B contains your 'contract tarief' then in cell C2 you could enter:
=IF($B2 = MAX($A:$A), $B2, IF(RANK($A2, $A:$A, 0)+COUNTIF($A:$A, $A2)-1 = 2, $B2*0.5, $B2*0.25))
You'll want to adapt that to match your layout of course.
Note that this will return the 100% tarief for all lines with the max value, the 50% for all lines with the second value, and the 25% for everything lower than that (things with duplicate values will get duplicate tariefs).
To give credit where it's due, I copied the unique ranking formula from here.
If one has Excel O365, you could try:
Formula in F2:
=LET(X,SORT(FILTER(A2:D6,D2:D6>0),1,-1),Y,SUM(INDEX(X,0,4)*(INDEX(X,0,3)/4)),Z,SUM(INDEX(X,0,4)),A,INDEX(X,1,4),Y+INDEX(X,1,3)*0.75+IF(Z=1,0,INDEX(X,IF(A>1,1,2),3)/4))
This is long and wordy and paining my head, I'm sure someone can come up with something clever =)
EDIT: The proper Dutch translation of this formula:
=LET(X;SORTEREN(FILTER(A2:D6;D2:D6>0);1;-1);Y;SOM(INDEX(X;0;4)*(INDEX(X;0;3)/4));Z;SOM(INDEX(X;0;4));A;INDEX(X;1;4);Y+INDEX(X;1;3)*0,75+ALS(Z=1;0;INDEX(X;ALS(A>1;1;2);3)/4))

Excel IF OR Statement

I am having trouble determining the correct way to calculate a final rank order for four categories. Each of the four metrics make up a higher group. A Top 10 of each category is applied to the respective product to risk analysis.
CURRENT LOGIC - Assignment of 25% max per category.
Columns - Y4
Parts
0.25
25
=IF(L9=1,$Y$4,IF(L9=2,$Y$4*0.9, IF(L9=3,$Y$4*0.8, IF(L9=4,$Y$4*0.7, IF(L9=5,$Y$4*0.6, IF(L9=6,$Y$4*0.5, IF(L9=7,$Y$4*0.4, IF(L9=8,$Y$4*0.3, IF(L9=9,$Y$4*0.2, IF(L9=10,$Y$4*0.1,0))))))))))
DESIRED...
I would like to use a statement to determine three criteria in order to apply a score (1=100, 2=90, 3=80, etc..).
SUM the rank positions of each of the four categories-apply product rank ascending (not including NULL since it's not in the Top 10)
IF a product is identified in more than one metric-apply a significant contribution weight of (*.75),
IF a product has the number 1 rank in any of the four metrics-apply a score of (100).
Data - UPDATED EXAMPLE
(Product) Parts Labor Overhead External Final Score
"XYZ" 3 1 7 7 100
"ABC" NULL 6 NULL 2 100
"LMN" 4 NULL NULL NULL 70
This is way beyond my capability. ANY assistance is appreciated greatly!!!
Jim
I figured this is a good start and I can alter the weight as needed to reflect the reality of the situation.
=AVERAGE(G28:I28)+SUM(G28:I28)*0.25
However, I couldn't figure out how to put a cap on the score of no more than 100 points.
I am still unclear of what exactly you are attempting and if this will work, but how about this simple matrix using an array formula and some conditional formatting.
Array Formula in F2 (make sure to press Ctrl+Shift+Enter when exiting formula edit mode)
=MIN(100,SUM(IF(B2:E2<>"NULL",CHOOSE(B2:E2,100,90,80,70,60,50,40,30,20,10))))
Conditional Formatting defined as shown below.
Red = 100 value where it comes from a 1
Yellow = 100 value where it comes from more than 1 factor, but without a 1.

Using If,Then function in Excel

I have a retail store that sells items on consignment for a fee that varies based on Selling Price.
So my question is how do I write a formula that checks the selling price and then charges the correct consignment fee to calculate the net based on the following schedule:
When selling price is over $400 then charge = 20%
When Selling price is $100 to $400 then charge = 30%
When Selling price is under $100 then charge = 40%
BLUF: use nested IF statements (an IF inside an IF) --
Example:
=IF(A2>=400, (A2*0.2), (IF(400 > A2 >= 100, (A2 *0.3), (A2*0.4))))
Or use the below if you suspect someone will foolishly enter a negative number or something nonsensical:
=IF(A2>=400, (A2*0.2), (IF(400 > A2 >= 100, (A2 *0.3), (IF(A2 < 100, (A2*0.4), (0))))))
That may look complex, but let's break it down from the beginning.
The basic formula for the IF statement:
=IF(testCondition, (resultIfTrue), (resultIfFalse))
One IF statement will only allow you to do two of your 3 conditions:
=IF(A1 > 400, (A1 * .20), (A1 * .30))
The above basically says that if the number in cell A1 is greater than 400, then the value in your current cell (e.g. B2) is A1 * 20%. But if the number in A1 is NOT greater than 400, the value in your cell will be A1 * 30%.
But how do we calculate the range you were asking (i.e. 100 - 400) and how do we add in a third possibility (i.e. the possibility that the number is less than 100)?
The answer is to use a nested IF. You can tell the cell what it's value should be if the condition is true, but you can test another condition if the answer is false (i.e. the next IF statement stands in the place of resultIfFalse.
=IF(testCondition, (resultIfTrue), (IF(testCondition, (resultIfTrue), (resultIfFalse))))
The above can handle 3 different scenarios. Out of the IFs above, you could also replace the second IFs resultIfFalse with yet another IF statement, and so on. You can nest up to 64 IF statements.
Extra Resources:
http://fiveminutelessons.com/learn-microsoft-excel/using-multiple-if-statements-excel
http://spreadsheets.about.com/od/tipsandfaqs/qt/nested_if.htm
Nested IF functions are not user friendly and require hardcoding your variables (percentages). My suggestion would always be to have a small table of values elsewhere: eg. put the following in A1:B3
0 0.4
100 0.3
401 0.2
Assuming your data is in D1 you can use the following formula in E1 and drag down if necessary
=INDEX($B$1:$B$3,MATCH($D1,$A$1:$A$3,1))
This way you can change your boundaries/ add more conditions easily without more nested IF statements
Try using this instead:
=IF(B1<100,B1*40%,IF((B1>=100)*AND(B1<=400),B1*30%,IF(B1>100,B1*20%,"Invalid Price"))
This formula contains nested-ifs and a logical AND condition which will give the result.

Compare percentage value against decimal Excel

I am a bit stumped with this issue, I was wondering if anyone could suggest a solution. In Excel I have a table which looks like this:
1 2 3 4 5 Result Score
80% 85% 90% 95% 100% 92.5% 3.50
What I am trying to calculate is that proportional score, based on where the result falls within the preset decimal 1-5 score.
Thanks.
In your case where each increment is 5% you could use a simple calculation like
=MAX(0,F2-75%)*20
[where result is in F2]
....but assuming that you want to interpolate the score given potentially less linear values in your table try this formula where your table is in A1:E2
=LOOKUP(F2,A2:E2,A1:E1+(F2-A2:D2)*(B1:E1-A1:D1)/(B2:E2-A2:D2))
for linear interpolation this would be general formula, just name the ranges or replace with cell references:
= (perc - minperc) / (maxperc - minperc) * (maxscore - minscore) + minscore

Resources