Help

Average numbers from one cell

Topic Labels: Formulas
2422 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Nathansvan
4 - Data Explorer
4 - Data Explorer

I have a task I want to do that I think should be pretty simple…but I can’t figure out how to do it in Airtable.

I have one cell with a list of numbers, separated by commas (“2, 3, 4, 5, 6”) and I want another cell to give me the average (“4”).

In google sheets I was able to do it with [=average(split(A3,", "))] but I can’t seem to find anything similar in airtable. Thanks!

2 Replies 2

Welcome to the community Nathan.

Correct; split() doesn’t exist in Airtable, but it does exist in Javascript (in script blocks) and you’ll also find some helpful pointers here.

I thought someone had actually posted a script block that performs split() examples so I would read through this section as well.

What type of field are the numbers in? If they are in a calculated field, such as a formula field, lookup, or rollup, there might be other options.

If the field is a text field, here are some more formulas for splitting a comma separated list into separate fields. If you go that route, you would need to use the VALUE function to turn the string into an actual number, and have another function to calculate the quantity of numbers and the average. It’s not for the faint of heart, but it is doable if the maximum number of items isn’t too high.

A script could do the calculations much easier. However, it would also require someone to press the “run” button.