Polynomial Regression via LINEST - excel

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}.

Related

Basic IF Statement question -probably right in front of me

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"))

How to Ignore the last cell with data in an excel formula

Good morning everyone!
This is my first question here.
I work with Revit and I am trying to organize a Keynote that should look something like this:
For this, I need to use a Txt Tab-delimited file, which is based on an excel file and define (see below in the right column) to which group each code belongs. This means, I need to concatenate all the cells and then always ignore the last cell that has a value (i.e. is not empty) in order to make my formula work.
For now, I have tried formulas similar to the one below, but I haven't found a solution yet. Has anyone tried something similar? The file is large and will probably suffer modifications over time, so doing it by hand is not the most convenient option.
=IF(D74="",C74,IF(E74="",CONCAT(C74," § ",D74),IF(F74="",CONCAT(C74," § ",D74,".",E74),CONCAT(C74," § ",D74,".",E74,".",F74))))
I think this is what you mean or helps you in the right direction:
Office 365 needed: =C73&IFERROR(" § "&TEXTJOIN(".",0,INDEX(D73:G73,,TRANSPOSE(SEQUENCE(COUNTA(D73:G73)-1)))),"")
Prior version of Excel: =C73&IFERROR(" § "&TEXTJOIN(".",0,D73:INDEX(D73:G73,,MAX((E73:G73<>"")*(COLUMN(E73:G73))-4))),"")

Creating a two way lookup Price Matrix in Excel using VBA (Index/Match/SumProduct)

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))

Functions about Excel VBA

I recently took over an Excel file. And now I try to modify the VBA codes at the back end. I cannot find Ceiling_Math function in Excel, can anybody tell me where to find the details of this function?
I cannot find the details anywhere.
Ceiling_Math is a rounding function that, when used with multiple arguments, lets you round up to multiples.
However in the example you gave, it appears to be only using only one argument, so I assume there is a default behaviour that means: round up to the nearest integer.
If that is the use case, consider switching it for the Excel ROUNDUP function.

EXP function Excel

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.

Resources