I'm not sure where to post this question but I thought here would be a good spot. What would be a Google Sheets formula to see if I am on track to stay within my allocated monthly allowance? I'm not very good at math and I've tried to come up with a solution but I'm not sure how & I've looked it up and done research but I still am not sure of the right formula to use. I've tried using something like (actual - goal)/ABS(goal)+100% but that returns a small number and I'm sure that's not correct.
Any help would be greatly appreciated! thanks!
Not sure I understand your question, maybe some example numbers could help.
Let say you have:
goal = 1000
actual=150
Using your formula
actual - goal = -850
I think what you should do is to find (goal - actual) instead => 850
Then you can do your percentage of use:
(goal - actual) / goal * 100 => 85%
So on your sheet, if your goal is in the cell A1 and your actual in cell A2, type something like (this is excel-like I believe):
=($A$1 - $A$2) / $A$1 * 100
Hope it is helping.
Related
Can anyone help with a formula / equation to help with my problem?
I'm trying to do (reverse) the following..........
I know the Base Price to be 250
The no. of orders are 8
Each order increases at scale of 1.5
=250*(1.5^7) = 4271.48 total
Im trying (and failing) to come up with a formula to reverse the above equation to provide me with the the Base Price (assuming I now know the total, in addition to the no of orders and the scale)
i.e what formula would I use to get the Base Price, assuming I know know the total is 4271.48 (based on the same 8 orders and scale of 1.5)
I've attached a quick spreadsheet to help describe my problem!
https://docs.google.com/spreadsheets/d/1hzHwvYbXWH8Pkpvf8K7GVyAFcgLWeRuTUcN9A1S52Hg/edit?usp=sharing
Thank you in advance :-)
Try this one. Use - in power.
=B17*(1.5^-7)
I'm trying to do a really simple lookup on a data validation field:
I have 4 simple values:
risk free
low
intermediate
high
and besides those I have the values for those:
0
0.1
0.2
0.5
I use the lookup formula as follows:
=LOOKUP(J11,H7:H10,I7:I10)
When I then change the values to let's say low or risk free, it always shows me the value 0.5.
But when I change the words to this:
abc
def
ghi
jkl
it delivers the right values.
I tried several different sheets, browsers as well as google accounts which uses different languages (english & german).
Can somebody please explain this to me :D
drop the lookup and use:
=VLOOKUP(J11, H7:I10, 2, 0)
I am making a scoring system on Google sheets and I am struggling with the logic I need for the final step.
This question might be related, but I can't seem to apply the logic.
There are a number of chemicals tested and for each an amount detected (AD) si given, and each has a benchmark amount allowed (AL). From AL and AD we calculate AD/AL= %AL.
The Total Score (TS) is calculated based on an additive and weighted formula that takes into consideration the individual %ALs, but I won't go into that formula.
The final step is for me to "calculate" the Display Score (DS), which has some rules to it, and this is where I need the logic. The rules are as follows:
If any of the %Als are over 100 (this is will make TS>100 too) and DS should show "100+"
If none of the %ALs are over 99, (TS may be above or below 100) then DS can NOT be over 99, so it should show TS, maxing out at 99.
I want to do this within the sheet itself. I think the correct tool is logic operators IF, AND, OR.
I have made many attempts, these are some: (I am replacing cell references with the acronyms I used above)
=IF(TS>100,"100+",TS)
=IF(OR(AND(MAX(RANGE_OF_%ALS)<100,TS>99),(AND(MAX(RANGE_OF_%ALS)>100,TS>100)),99,"100+"))
I have also tried to think about how I would solve this in Python (just to explore it, I don't want to use Python for the solution). This was my attempt:
if Max%AL<100:
if TS<100:
print(TS)
else:
print("99")
else:
if TS>100:
print("100+")
Those are my attempts at thinking through the problem. I would appreciate some help.
This is a link to a copy of my sheet: https://docs.google.com/spreadsheets/d/1ZBnaFUepVdduEE2GBdxf5iEsfDsFNPIYhrhblHDHEYs/edit?usp=sharing
Please try:
=if(max(RANGE_OF_%ALS)>1,"100+",if(max(RANGE_OF_%ALS)<=0.99,MIN(TS,0.99),"?"))
Google Spreadsheet on google drive. I have just made a survey on google drive for people to fill in their football predictions for fun! I can put all of the publics predictions into an excel document in one click but I want the public to earn points when they predict the right result. For example if a friend of mine predicted Arsenal 2 - 1 Liverpool and the result is Arsenal 1 - 0 Liverpool they should earn 1 point for predicting the right winner and if the prediction was equal to Arsenal 2 - 1 Liverpool, the prediction should earn 3 points.
I am struggling with the code for it but here is the closest I have got:
COUNTIF(F5, ʺ>=ʺ & E5)
The code above does not work and I cannot figure it out. Any help will be greatly appreciated as soon as possible. Thanks a lot.
I am sorry that this is not an answer, but I am unable to comment without higher reputation. It would be helpful to have access to a copy or example of what you have, as your cell references mean very little without. Then we can see exactly what you have tried.
EDIT::
Without knowing how your sheet works or is laid out, it is difficult, however I've put this together for you on Google Sheets here
https://docs.google.com/spreadsheets/d/13Ejaddmj2d8cysxdZE_Inro65KDFgzeJW7FqPWwaCpE/edit?usp=sharing
It's a very clunky set of nested IF statements but it does work. I'm sure there is a neater way of doing it.
In case you can't view it, here is the formula
=IF(A2>B2, IF(D2>E2, IF(A2=D2, IF(B2=E2,"3","1"),"1"),"0"), IF(A2=B2, IF(D2=E2, IF(A2=D2, IF(B2=E2,"3","1"),"1"),"0"), IF(D2<E2, IF(A2=D2, IF(B2=E2,"3","1"),"1"),"0")))
In this case, A2 is Arsenal's score, B2 is Liverpool's score, D2 is Fred's Arsenal score prediction and E2 is his Liverpool prediction. I placed the above formula in cell F2 to give Fred's points.
The above code first checks to see
if Arsenal beat Liverpool, if true it then checks
if Fred predicted that Arsenal would beat Liverpool. If true, then it checks
if Fred got Arsenal's score correct. If true, it checks
if Fred got Liverpool's score correct. If that's true,
then Fred got everything right and gets 3 points (and a cookie =]).
If Fred gets the winner right but not the scores, he gets 1 point. Otherwise he gets 0.
This formula also checks to see if Liverpool beat Arsenal and runs the same checks against Fred's prediction, then to see if the teams drew and to see if Fred predicted a draw or not. If he predicts a draw and the correct scores he gets 3 points, otherwise he gets 1 for getting the draw correct.
I believe that this is what you are looking for .. attached are a formula and result view of my answer ;)
formulas
results
In my application I need to determine what the plates a user can load on their barbell to achieve the desired weight.
For example, the user might specify they are using a 45LB bar and have 45,35,25,10,5,2.5 pound plates to use. For a weight like 115, this is an easy problem to solve as the result neatly matches a common plate. 115 - 45 / 2 = 35.
So the objective here is to find the largest to smallest plate(s) (from a selection) the user needs to achieve the weight.
My starter method looks like this...
-(void)imperialNonOlympic:(float)barbellWeight workingWeight:(float)workingWeight {
float realWeight = (workingWeight - barbellWeight);
float perSide = realWeight / 2;
.... // lots of inefficient mod and division ....
}
My thought process is to determine first what the weight per side would be. Total weight - weight of the barbell / 2. Then determine what the largest to smallest plate needed would be (and the number of each, e.g. 325 would be 45 * 3 + 5 or 45,45,45,5.
Messing around with fmodf and a couple of other ideas it occurred to me that there might be an algorithm that solves this problem. I was looking into BFS, and admit that it is above my head but still willing to give it a shot.
Appreciate any tips on where to look in algorithms or code examples.
Your problem is called Knapsack problem. You will find a lot solution for this problem. There are some variant of this problem. It is basically a Dynamic Programming (DP) problem.
One of the common approach is that, you start taking the largest weight (But less than your desired weight) and then take the largest of the remaining weight. It easy. I am adding some more links ( Link 1, Link 2, Link 3 ) so that it becomes clear. But some problems may be hard to understand, skip them and try to focus on basic knapsack problem. Good luck.. :)
Let me know if that helps.. :)