I'm trying to get this into excel: e^(-(2.2/9.58)^2)
According to my graphical calculator AND wolfram alpha this should give: 0.9486
However when I type it in excel with the following formula: =EXP(-(2.2/9.58)^2) I get 1.054
I've tried multiple different things but I still can't get the right answer out of it. What am I doing wrong with the formula in Excel??
Excel seems to mess up the brackets and does some distribution on its own. Very odd.
=EXP(-((2,2/9,58)^2)) should work
By way of some explanation, in Excel (as conventional) the negation operator has precedence over exponentiation. So:
=EXP(-(2.2/9.58)^2)
is treated just as:
=EXP((-2.2/9.58)^2)
or
=EXP(0.052737)
would be, hence resulting in 1.05415. Whereas:
=EXP(-0.052737)
is 0.948629.
Related
=IF(AND(F2=N2;G2>O2);"No Notificar";"Notificar";IF(AND(F2=N3;G2>O3);"No Notificar";"Notificar";IF(AND(F2=N4;G2>O4);"No Notificar";"Notificar";IF(AND(F2=N5;G2>O5);"No Notificar";"Notificar";IF(AND(F2=N6;G2>O6);"No Notificar";"Notificar";IF(AND(F2=N7;G2>O7);"No Notificar";"Notificar")))))
As #KromeWing said - you've entered too many parameters for an IF formula.
It should have a logical calculation that would return TRUE/FALSE and then what to do if it's TRUE and what to do if it's FALSE.
Currently your formula reads as:
=IF(AND(F2=N2,G2>O2),"No Notificar","Notificar",
IF(AND(F2=N3,G2>O3),"No Notificar","Notificar",
IF(AND(F2=N4,G2>O4),"No Notificar","Notificar",
IF(AND(F2=N5,G2>O5),"No Notificar","Notificar",
IF(AND(F2=N6,G2>O6),"No Notificar","Notificar",
IF(AND(F2=N7,G2>O7),"No Notificar","Notificar")))))
It should look more like:
=IF(AND(F2=N2,G2>O2),"No Notificar",
IF(AND(F2=N3,G2>O3),"No Notificar",
IF(AND(F2=N4,G2>O4),"No Notificar",
IF(AND(F2=N5,G2>O5),"No Notificar",
IF(AND(F2=N6,G2>O6),"No Notificar",
IF(AND(F2=N7,G2>O7),"No Notificar","Notificar"))))))
So if the first equation is TRUE it will show No Notificar, otherwise it will test the second equation. If all equations return FALSE then it will return Notificar.
IF has only 3 parameters.
Your consecutive IF should be the 3rd parameter, there is no 4th parameter in this formula.
You are expecting IF() to accept four arguments instead of three.
I often get messed up by nested ifs, too, and it's usually from having to think too hard.
To make things easier on yourself, both today and next month when you come back to this and have to try to figure out what the heck you were trying to do, try using alt-enter to add a new line within your formula, allowing you to format your formula like this:
=IF(test, valueIfTest,
IF(test2, valueIfTest2,
IF(test3, valueIfTest3,
...
valueIfAllTestsFail
)))
I find that as long as I stick to this format, the hardest part of the syntax is reduced to having the right number of closing parentheses at the end, but thanks to how Excel color-codes matching parentheses, I can manage that even when I'm caffeine-deprived!
Sorry i know this is super basic but i didn't know where else to ask and i really feel like the answer is right in front of me...
I have a spreadsheet which im going to use to log PAT test results. When i select the test type from a drop down it changes the standards and thresholds in the bit below and will tell me if each test passes or fails. It uses several vlookups and relative references - so far no VBA. Looking at this photo. What I'm trying to do is get the formula in cell I13 to read the symbol in F13 and use that in the formula rather than typing the symbol directly into the formula as its going to change when i change the Class Type option.
So far ive gotten to this (has a blank IF to start with to keep it neat:
=IF(H13="","",IF((H13&F13&(VALUE(G13))),"PASS","FAIL"))
The bit in bold is where the issue is. When i run the evaluate formula it boils the bold bit down to "0.01>2" which is correct however it then wont read that in the larger IF statement - i think its the quotation marks. So i think it needs another function to allow the IF statement to read that as the logical test rather than a text string.
I've tried VALUE, FORMULATEXT, NUMBERTEXT, all the ones that might be close to what I'm trying to do but 100% stumped now. Always bring sup the #VALUE Error.
Appreciate any advice? TIA
There is no built-in function for that. You need either a VBA function or the old EVALUATE XLM function (which you can't use directly in a cell, it has to be in a defined name). Sample UDF:
Function EvaluateFormulaString(FormulaString as string)
EvaluateFormulaString = application.evaluate(formulastring)
End Function
then your formula would become:
=IF(H13="","",IF(EvaluateFormulaString(H13&F13&(VALUE(G13))),"PASS","FAIL"))
I'm trying to create a pricing matrix for products but using Index/Match or SumProduct formulas are proving to be a nightmare for me, I'm wondering if VBA would be easier?
Essentially if a product width or height is in between two figures, I need the price quoted to take on the next pricing bracket. (NB: Rounding up or using Ceiling functions within the formula doesn't work for me either)
Examples of the code I've tried using are:
=SUMPRODUCT(--(HeightRange=CEILING(Height,1000))*--(WidthRange=CEILING(Width,10))*PriceRange)
=INDEX(PriceRange,MATCH(MIN(ABS(HeightRange-Height)),ABS(HeightRange-Height),-1),MATCH(MIN(ABS(WidthRange-Width)),ABS(WidthRange-Width),-1))
Example Table:
Use:
=INDEX(B:J,MATCH(N3,A:A),MATCH(M3,B$3:J$3))
You could make use of =AGGREGATE() like so:
=INDEX(A:E,AGGREGATE(15,3,(($A$4:$A$11>=N3)/($A$4:$A$11>=N3))*ROW($A$4:$A$11),1),AGGREGATE(15,3,(($B$3:$J$3>=M3)/($B$3:$J$3>=M3))*COLUMN($B$3:$J$3),1))
You can use directly formulas just like both guys said above...
Mine here:
=INDEX($A:$J,MATCH($N3,$A:$A,0),MATCH($M3,B$3:J$3,0))
I'm trying to do a search for multiple strings in a cell with an OR-condition in Excel 2016.
E.g. I have a string abcd1234 and I want to find ab OR 12.
I'm using the german version where the function SEARCH is called SUCHEN and it should behave the same way.
I found this answer which suggests this solution:
SEARCH({"Gingrich","Obama","Romney"},C1).
I also found this website which suggests the same syntax:
SEARCH({"red","blue","green"},B5)
Same with this website:
SEARCH({"mt","msa","county","unemployment","|nsa|"},[#Tags])
So they basically say make a list of search terms separated by commas enclosed by curly braces and you're good.
But putting these into Excel 2016 just results in the usual meaningless Excel error message which says there was an error with the formula and it's always highlighting the whole part in curly braces.
Taking the first example the only way I could get Excel to not throw its error message was to change the syntax like this:
=SEARCH({"Gingrich";"Obama";"Romney"};C1)
But separating the search terms with semicolons doesn't apply the OR-condition correctly, so this is not the solution.
I'm aware from this answer that I could make separate searches and string them together with a condition, but I would like to avoid that, and I also want to know why the syntax that is supposed to work as confirmed by multiple sources is not working for me.
EDIT:
Okay, I'm starting to understand this, thanks to Solar Mike:
The code =IF(COUNT(SEARCH({"Romney","Obama","Gingrich"},A1)),1,"") works indeed perfectly fine.
Also =COUNT(SEARCH({"Romney","Obama","Gingrich"},A1)) works.
But =SEARCH({"Romney","Obama","Gingrich"},A1) does not.
Also =ISNUMBER(SEARCH({"Gingrich","Obama","Romney"},A1)) does not work.
I'd love to know the reason why.
Ok, so this works:
OR(IFERROR(FIND("ab",A1,1),0),IFERROR(FIND("12",A1,1),0))
tested here :
I followed one of the links and the version like this:
=IF(COUNT(SEARCH({"Romney","Obama","Gingrich"},C1)),1,"")
worked as expected for me, but if the search is isolated it then fails and I have not found an explanation ...
Like other array-style formulas, the part that delivers the array has to be enclosed in some sort of aggregate function to make it scan through the array - otherwise it only looks at the first element of the array. So anything like COUNT, SUM, SUMPRODUCT will do the trick.
My preferred one is
=OR(ISNUMBER(SEARCH({"a","b","c"},A1)))
because you can easily change it to this if you want AND logic:
=AND(ISNUMBER(SEARCH({"a","b","c"},A1)))
I am trying to do a quadratic regression via LINEST in Excel 2013 as described in this thread with its wonderful answer. Unfortunately it does not work for me. What I get is the following:
I am using the German version of Excel, so I have to use the function RGP which is the equivalent of LINEST. And WAHR means TRUE.
The cell in the 7th and 13th row just show the copied code from the arrays. Of course I get the same coefficients when I don't put ;;WAHR at the end. I just want to show the entire stats to you, maybe it's important for the error diagnosis.
When I try to get a cubic regression via =RGP(B2:B5;A2:A5^{1,2,3}) Excel asks me if the formula should be corrected to =RGP(B2:B5;A2:A5^{1,23}). If I select No, I have to change the formula, because otherwise there would be a problem.
So why do I not get 1, 2 and 1 as coefficients in the quadratic case and why does the cubic case not work at all? What could be the problem? Did anything change in Excel 2013?
I answer the question now instead of deleting it, because there may be somebody who has the same problem. And simoco obviously didn't feel like putting his comment as an answer.
As simoco already said in his comment, the separator , in ^{1,2} is dependent on the localization of Excel.
Since I have the German version of Excel I have to use a dot . instead. So everything works fine with ^{1.2} and ^{1.2.3}.