I am trying to use excel solver to calculate a total number of hours by person when as well as some of their rates when I am provided with the Total Amount and I already know some of the rates.
Screenshot of worksheet
I know the following constraints will apply:
-Rates must integers divisible by 5
-Hours must be rounded to the tenth's place
-Rates will have a ">=" value depending on the worker
Thoughts on how to constrain the results to the variable cells this way so the rates will end in 5 or 0, and the hours will only stop at the tenth's place instead of returning 4.99663675 as a result?
Related
I want to calculate the number of work hours it takes to produce X. The first X takes 20 hours, but for each X it takes 20% less time. However, it will always take a minimum of 2 hours.
Any help is appreciated.
In Excel, this is really easy: 20% less means you are calculating 80% of the value, which in fact means that you are multiplying the value with 0.8.
As the value can't go below 2, you can simply take the maximum between the calculated value and 2, using the formula:
=MAX(2,0.8*A1)
The result looks as follows:
Have fun!
In order to calculate the sum, you can use the simple formula =SUM(A$1:A2) up to the end, as you can see in following screenshot:
An individual term of a geometric series is given by
The sum of a geometric series is given by
where in your case a=20 and r=0.8
You can show by taking logs or by trial and error that in your particular case you have
0.8^10 = 0.107374
so when n=11 you can see that the time has diminished to just over 2 hours. After that each rep takes 2 hours. So you have
=a*(1-r_^MIN(C2,11))/(1-r_)+MAX(0,C2-11)*2
for the total.
If you just want the time per item, it's
=IF(C2<=11,a*r_^(C2-1),2)
where a and r_ are named ranges for a and r, and the values of N are in column C.
I am trying to create a formula in Excel that solves for the base number of units needed on a monthly interval with an annual growth escalator that matches in whole units the total I'm starting with. I can't from a practical standpoint have fractions.
This is an example of the formula x is number of monthly units, y is the total number of units and the desired annual growth rate is 20%. Here is the algebra butin practice only one variable will need to be solved for (x): y= 12x + (1.2x)*12+(1.2^2)*x*12+(1.2^3)*x*12. I get close using the round function but always end up a few short of the total desired due. Is there a way to add on the difference at the end formulaically?
ROUND(20000/(12+(12*(1+20%))+12*(1+20%)^2+12*(1+20%)^3),0)
I'm extremely close but I need to make sure the total by month matches the total desired.
I am doing a project using accelerometers and have collected large volumes of readings. I need to find acceleration spikes. I used a previous formula I found
=SUMPRODUCT(--(N3:N586>N2:N585),--(N3:N586>N4:N587))
The range of values is N2:N587, how this counts every peak, so even if a sensor reading jumps up and down I get a count. Is there a way to adapt this to count major peaks some like PEAK = cell value is greater than the preceding or following 3,4 or 5 cell values.
as an example
0.01, 0.02, 0.015, 0.018, 0.015, 0.014, 0.016, 0.02, 0.017, 0.018, 0.014,
in this sample I want to count 0.02 as a Major peak, but not the 0.018 as minor peaks.
I can do it if I plot as a graph and manually count, but for some recordings I have over 3000 values I have to expand the graph quite a lot to count them.
any help would be great thanks
You can use VBA and check, if the cell value is greater than a threshold. Yet you don't need VBA, you can use another column and just write an IF-Statement to check, if a threshold is exceeded. If so, return TRUE. Then count all TRUE values using COUNTIF. Or you can directly use COUNTIF and check for thresholds.
For instance:
Using this formula should return the total number of values above 150 in your range: =COUNTIF($N$3:$N$586;">150"). Please note: The cell references are absolute values. The formula returns a total number, not the sum. Adapt the range and the threshold as you need.
You could use an offset formula to check whether the current reading is greater than the previous and next n readings:
=SUM(IFERROR(($A$2:$A$12>SUBTOTAL(4,OFFSET($A$1,ROW($A$2:$A$12)-B2-1,0,B2)))*
($A$2:$A$12>SUBTOTAL(4,OFFSET($A$1,ROW($A$2:$A$12),0,B2))),0))
Has to be entered as an array formula using CtrlShiftEnter
The required offset is stored in B2.
I have tried it with a range of offsets as below:
As you can see, when the offset is increased to 6, you get no peaks because the second peak of 0.02 is equal to the first peak of 0.02. This does highlight a potential snag with this approach, that if you got a genuine peak or plateau with (say) two consecutive values of 0.02, it wouldn't be counted. But if your actual data has several decimal places this probably won't happen.
It's possible for this formula to give a spurious peak at the end of the range because it counts values beyond the range (i.e. A13, A14 etc.) as zeroes - the formula could be further refined to avoid this.
I am having trouble with the logic of nesting if statements to check if the previous 4 cells are greater than 0.
What I am trying to do is calculated a luxury tax on a baseball team.
Originally, I wrote:
=IF(C74>J74,C74+(C74-J74)*IF(I71<>0*I72<>0*I73<>0, 0.5, IF(I72<>0*I73<>0,0.4,IF(I73<>0,0.3,0.175))), 0)
But it sums up all 4 years and doesn't factor in the consecutive idea.
Then I tried:
If they go over the salary tax threshold:
the first time then there is a 17.5% tax on the amount over:
if(C74>J74, I74*0.175, 0)
the second consecutive time there is a 30% tax on the amount over:
if(C74>J74, if(C73>J73, I74*0.3), I74*0.175), 0)
The third consecutive time there is a 40% tax:
if(C74>J74, if(C73>J73, if(C72>J72, I74*0.3), I74*0.175), 0)
And the fourth consecutive time there is a 50% tax:
if(C74>J74, if(C73>J73, if(C72>J72, if(C71>J71, I74*0.5), I74*0.3), I74*0.175), 0)
Straight from Wikipedia:
The threshold level for the luxury tax will be $189MM in 2014 (up from $178MM from 2011-2013) and will remain at $189MM through 2016. From 2012 through 2016, teams who exceed the threshold for the first time must pay 17.5% of the amount they are over, 30% for the second consecutive year over, 40% for the third consecutive year over, and 50% for four or more consecutive years over the cap.[4]
In my forumla, currently if a team goes over the luxury tax, then under, then over again- the calculation will still apply a 40% tax instead of 17.5.
Is there anyway check the conditions of the four preceding cells without having to write jumbled nested ifs like I am about to do?
I'd add a new column with a single IF statement, if the value is greater than the cap, then 1, otherwise 0. Then when you figure the tax, take the sum of "this" row's cell plus the three above it, and that tells you the number of years in this plus the last 4 that they're over. Which is what you're doing now, it sounds like.
If you want to just know CONSECUTIVE years, you could do something like,
if(sum(4 values)=4,50%,if(sum(3 values)=3,40%,if(sum(2 values)=2,30%,if(thisRow=1,17.5%,0%))))
That gives you the tax rate, and you can multiply the value its taxing in the same cell or elsewhere.
Hope that helps!
In the attached excel file
http://www.sendspace.com/file/y9qj0t
I've got a time period "C3:D3" (time periods can be altered by user) and a sum of money for which i need to calculate interest across different time periods with different interest rates.
You can check out my formula in "E6:E" but somehow I'm not postive it's correct.
I want the formula to divide days of the above period of time across the different int. rates time frames & return "0" when int.rates times frames are before or after my time period.
Also, I'm not certain how to handle the last int. rate time frame (ie the last time int. rate was changed so it's not a closed time frame B50:C50). B50 is occupied by the last date int. rate was changed and C50 equals above mentioned D3. Does it make any sense?
Thanks for any help!
I was going to answer your previous question....but you deleted it...
Your method works, I think, but this formula can give you the correct result in a single cell without using columns E and F
=SUMPRODUCT(LOOKUP(ROW(INDIRECT(C3&":"&D3-1)),B6:D50))/365*E3
it doesn't matter what value you put in C50
The ROW/INDIRECT part gives you an "array" of all dates from C3 to D3-1 and that array is the lookup value for LOOKUP function, looking up each date in B6:B50 and returning the corresponding rate from D6:D50. SUMPRODUCT then sums all those rates. Diving by 365 then gives you the average annual rate. I get 2.89 for your example, the same as your result