# Need help with formula

**URL:** <https://community.glideapps.com/t/need-help-with-formula/70041>\
**Category:** Ask for Help\
**Created:** [January 25, 2024, 11:12pm UTC](https://community.glideapps.com/t/need-help-with-formula/70041 "2024-01-25T23:12:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent\_Kbaier](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/laurent_kbaier/32/61103_2.png) [@Laurent\_Kbaier](https://community.glideapps.com/u/Laurent_Kbaier)\
**Post date:** [January 25, 2024, 11:12pm UTC](https://community.glideapps.com/t/need-help-with-formula/70041/1 "2024-01-25T23:12:50Z")

</div>

Hi guys, sorry for my dumb question (playing with glide only since 4 days…) but this thing drive me crazy: I have a complex formula from excel whoch work on excel and on google sheet…but I think the syntax is different on Glide… Here is the formula:

```auto
=1-(0,9144^EXP((12,344*LN(A2)+11,853*LN(B2)-2,664*LN(A2)*LN(B2)-7,99*LN(C2)+1,769*LN(A2)*LN(C2)+1,764*LN(D2)+7,837*E2-1,795*LN(A2)*E2+0,658*F2)-61,18))

```

I have this error:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f76b852b1fcf846f6ad5482c62fb5a16919173a2.png)

If someone can help me for my mental health…thank you 🙂

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [January 25, 2024, 11:24pm UTC](https://community.glideapps.com/t/need-help-with-formula/70041/2 "2024-01-25T23:24:42Z")

</div>

![IMG_3570](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/8/38b774b44d28bd47d54d760bb3a47c2133d96a2c.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [January 26, 2024, 12:27am UTC](https://community.glideapps.com/t/need-help-with-formula/70041/3 "2024-01-26T00:27:04Z")

</div>

I put your code in a code block above so it displays correctly in the forum. Some characters were being excluded.

This works in a javascript column. Since the javascript column can only accept 3 parameters, we have to join all input values together into one p1 parameter and split it out in the code. You will have to do that with a template column. Then you can pass the template column into a javascript column as a p1 parameter. You could have maybe done it with an excel column, but that column is one parameter short, so it would have been a lot of extra work to get the extra parameter included. Javascript is a bit easier to follow than an Excel formula.

Here is the code:

```auto
let param = p1.split('|');
let A2 = parseFloat(param[0]);
let B2 = parseFloat(param[1]);
let C2 = parseFloat(param[2]);
let D2 = parseFloat(param[3]);
let E2 = parseFloat(param[4]);
let F2 = parseFloat(param[5]);

let result = 1 - Math.pow(0.9144, Math.exp((12.344 * Math.log(A2) + 11.853 * Math.log(B2) - 2.664 * Math.log(A2) * Math.log(B2) - 7.99 * Math.log(C2) + 1.769 * Math.log(A2) * Math.log(C2) + 1.764 * Math.log(D2) + 7.837 * E2 - 1.795 * Math.log(A2) * E2 + 0.658 * F2) - 61.18));

return result;

```

Here is how I set up the javascript column. Just replace p1 with appropriate template column.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/0/70336fef4bd2c8dc6d728b4bfeb1795b6d270e1d.png)

Notice that I’m using a Pipe (|) to separate each value. It’s safer than using commas because I assume your number inputs could have commas. The pipe is what you will use in your template column to separate each input value.

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [January 26, 2024, 12:48am UTC](https://community.glideapps.com/t/need-help-with-formula/70041/4 "2024-01-26T00:48:21Z")

</div>

And this is why we are all grateful for your contributions!

Awesome technique

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 26, 2024, 2:05am UTC](https://community.glideapps.com/t/need-help-with-formula/70041/5 "2024-01-26T02:05:57Z")

</div>

> [@Jeff\_Hager](#):
>
> I’m using a Pipe (|) to separate each value.

I use a double pipe. Because one can never be too careful 😂

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [January 26, 2024, 2:23am UTC](https://community.glideapps.com/t/need-help-with-formula/70041/6 "2024-01-26T02:23:54Z")

</div>

We process a lot of pipe delimited data for work, so it’s habit for me. But yes, you can’t be too careful. I find comma delimited to be about the worst. Pipe is pretty safe. Double Pipe is almost Murphy’s law proof.

---

<div class="post-metadata">

**Author:** ![Laurent\_Kbaier](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/laurent_kbaier/32/61103_2.png) [@Laurent\_Kbaier](https://community.glideapps.com/u/Laurent_Kbaier)\
**Post date:** [January 26, 2024, 7:50am UTC](https://community.glideapps.com/t/need-help-with-formula/70041/7 "2024-01-26T07:50:34Z")

</div>

Hi, thank you for your quick reply! I dont have the plan for javascriipt….and I spent one day to reverse engeener the javascript which calcul this!!! :-).

Now I have to upgrade my plan…. 🙂

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 26, 2024, 7:55am UTC](https://community.glideapps.com/t/need-help-with-formula/70041/8 "2024-01-26T07:55:22Z")

</div>

You don’t have to upgrade. The JavaScript column is available on all plans, including the Free Plan.
