# Summing content in cells in a table

**URL:** <https://cl.desmos.com/t/summing-content-in-cells-in-a-table/3868>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [December 2, 2021, 2:00am UTC](https://cl.desmos.com/t/summing-content-in-cells-in-a-table/3868 "2021-12-02T02:00:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zuzka\_Blasi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/zuzka_blasi/32/2125_2.png) [@Zuzka\_Blasi](https://cl.desmos.com/u/Zuzka_Blasi)\
**Post date:** [December 2, 2021, 2:00am UTC](https://cl.desmos.com/t/summing-content-in-cells-in-a-table/3868/1 "2021-12-02T02:00:38Z")

</div>

I’d like to score a problem set so students work until they have earned a set number of point (problems have different point values). I think the easiest thing would be to have a table that would check answers with a column for points earned so when a correct answer is entered those points are added to the student’s tally.

Is there a way to define a variable that is a sum of the values in a column that I could use to both display the point total and unhide an image congratulating them for earning the required number of points?

---

<div class="post-metadata">

**Author:** ![pirsquared](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@pirsquared](https://cl.desmos.com/u/pirsquared)\
**Post date:** [December 2, 2021, 7:19pm UTC](https://cl.desmos.com/t/summing-content-in-cells-in-a-table/3868/2 "2021-12-02T19:19:49Z")

</div>

The easiest way would be to have a hidden graph component, into which you can feed a numberList via columnNumericValues - eg. `numberList(`A`): table.columnNumericValues(3)`

In the graph, you can then calculate total(A) as another number - eg. t=total(A) - and then pull that number back into CL using `graph.number(`t`)`

---

<div class="post-metadata">

**Author:** ![Zuzka\_Blasi](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/zuzka_blasi/32/2125_2.png) [@Zuzka\_Blasi](https://cl.desmos.com/u/Zuzka_Blasi)\
**Post date:** [December 2, 2021, 8:35pm UTC](https://cl.desmos.com/t/summing-content-in-cells-in-a-table/3868/3 "2021-12-02T20:35:31Z")

</div>

I just tried your advice but was not able to get it to work, sorry not to have the coding fluency.

I did find another way to make this work that doesn’t use a graph: [Graded Table of Answers Frame • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/61a8244d38898c421b92dd7b)

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [December 3, 2021, 4:49am UTC](https://cl.desmos.com/t/summing-content-in-cells-in-a-table/3868/4 "2021-12-03T04:49:55Z")

</div>

> [@pirsquared](#):
>
> `numberList(` A `): table.columnNumericValues(3)`

The A needs to be surrounded by quotes or backticks.

(@pirsquared If you use triple backticks around your code in the forum, it’ll display how I think you intended:  
`numberList(` A `): table.columnNumericValues(3)`
