Check an expression in a table

Hi! I have a question.
I’m trying to have an answer check for 2 cells in my table and I can’t figure out how to do it.
For the first cell the correct answer is this formula : (cellContent(1,2) - cellContent(1,3))
For the second it is ((cellContent(1,4)/cellContent(1,3))*100)

Can anyone help?
I would share my activity but it’s in French so I’m not sure that would help :slight_smile:
Thanks!!!

Any time you want to make a comparison that requires a calculation you’ll need to use
numericValue(` `) or simpleFunction(` `).evaluateAt( ). For example:

checkV1 = numericValue(`${this.cellContent(1,2)} - ${this.cellContent(1,3)}`) = 20
checkV2 = simpleFunction(`x-y`, `x`,`y`).evaluateAt(this.cellNumericValue(1,2), this.cellNumericValue(1,3) )

In the first, any reference to variable content needs to be surrounded with ${ }. In the second, call the variables what you want and define them, then evaluate at the desired values (which must be in number format, thus .cellNumericValue instead of .cellContent.

For your second need, you may consider rounding the result before comparison, checking the answer is within a range, or the absolute value of the difference is within a certain tolerance. I’m sure there are examples if you search the forum.

Thank you! I will try this :slight_smile: