Giving student feedback based on multiple cells

My students are doing a PBL based on the textbook problem in which the volume of a box is calculated using only the size of the “flaps” that are cut from each corner of their starting sheet of cardstock. I want cell (2,5) of the table to tell them they are correct if the numeric value of cell (2,4) is equal to the value of cell (2,2) minus two times the value of cell (1,4). For some reason, I cannot get the CL to work. Here is what I currently have:

cellContent(2,5):when Table4a.cellNumericValue(2,4)=Table4a.cellNumericValue(2,2)-2*(Table4a.cellNumericValue(1,4)) “:star_struck:
otherwise “:sleepy:

The CL identifies any type of math operation (in this instance, the “*” symbol) as being incorrect. Any suggestions are welcome!

Any calculations done in CL need to be within numericValue( ) or using a simpleFunction( ).evaluateAt( ): (Also, to refer to the current component you can use “this” instead of the component name, which makes duplicating slides much more efficient if needed)

cellContent(2,5):when this.cellNumericValue(2,4)= numericValue(`${this.cellNumericValue(2,2)}-(2*${this.cellNumericValue(1,4)}) “:star_struck:”
otherwise “:sleepy:”

Thank you so much for your help!

It is now giving me the following error message: “Syntax error: Expected latex characters or interpolation, but found UNEXPECTED_EOL”

Probably missing a closing bracket or closing quotation mark or something. Can you post your CL exactly as you’ve entered it (or link us to your activity), and we can see if we can spot the error.

Sure! The code I am working with is on slide 4.

You’re missing the closing backtick at the end of the numericValue( ) calculation.