Conversion of Excel formula back to written Formula...if possible!

1.6k Views Asked by At

I turn to you as a last resort, in the hope that you will forgive my Maths ignorance and help me with what may be a simple problem.

Essentially, this involves converting an excel formula to written math, if possible. As I am absolutely not a specialist in Math, I barely even know where to begin...but I am seeking a formula to express the following idea.

Essentially I am using Excel to find value a which is determined by two different equations depending on the value of $b$.

If $b > 0$, then the value of a will be determined by equation $Y$. If $b < 0$, then the value of a will be determined by equation $Z$.

The actual excel formula is as follows: =IF(C14>0,J14,K14). It's the standard IF function.

So this already would be a great help...

What I am then going to do is to find the average of values of $a$ over any number of instances...so I need to sum then divide by the number of instances.

Can this be expressed in any form of mathematical formulae?

Your help would be much appreciated.

1

There are 1 best solutions below

5
On

We use a brace to show cases, so you would say $$f(b)=\begin {cases} J14 & b \gt 0\\K14 & b \le 0 \end {cases}$$ where you substitute in the formulas that generate J14 and K14. Then if you have a bunch of points $x_i$ you could write $$sum=\sum_{i=1}^nf(x_i)\\avg=\frac 1n\sum_{i=1}^nf(x_i)$$