Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Airtable Community
- Discussions
- Ask A Question
- Formulas
- Re: How to sum up two values and create an array?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Solved

Jump to Solution

0
1938
1

Showing results for

Comment Post Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jun 10, 2023 11:31 AM - edited Jun 10, 2023 11:37 AM

Hello,

I am looking for a way to do something like this:

I do have two values. I want to sum up these tweo numbers and create 3 more results.

I.e. the value of field "first field" is 70, the value of field "second field" is 10.

The result should be the sum of both values but with 9 more calculated numbers: i.e. 80 / 90 / 100 / 110 / 120 / 130 / 140 etc. (So I need a total of 10 numbers in the result. And all numbers should be separated with a slash and a space before and after the slash).

How is this possible with a formula?

Thanks for help,

Michael

Solved! Go to Solution.

1 Solution

Accepted Solutions

Solved
See Solution in Thread

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jun 10, 2023 07:18 PM - edited Jun 10, 2023 08:36 PM

```
CONCATENATE(
({field1} + {field2}) & " / ",
({field1} + (2 * {field2})) & " / ",
({field1} + (3 * {field2})) & " / ",
({field1} + (4 * {field2}))
)
```

But note that this does not produce a true array. It produces a text string that looks like a list of items.

4 Replies 4

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jun 10, 2023 02:46 PM - edited Jun 10, 2023 02:47 PM

Hi @micha281sth,

You can do so by wrapping your field calculations in parenthesis () and then combining these with text like:

`({first field} + {second field}) & ' / ' & ({third field} + {fourth field}) & ' / ' & ...`

Hope that helps!

-Stephen

-Stephen

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jun 10, 2023 03:05 PM

Hi @Stephen_Orr1 ,

thanks for the formula. But I do only have the first field and second field. The third and fourth field is being calculated (the result plus 10 / the new result plus 10 / etc.).

I.e.: 70 + 10 = 80 + 10 = 90 + 10

Do you know what I mean?

Thanks again,

Michael

Solved
See Solution in Thread

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jun 10, 2023 07:18 PM - edited Jun 10, 2023 08:36 PM

```
CONCATENATE(
({field1} + {field2}) & " / ",
({field1} + (2 * {field2})) & " / ",
({field1} + (3 * {field2})) & " / ",
({field1} + (4 * {field2}))
)
```

But note that this does not produce a true array. It produces a text string that looks like a list of items.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Jun 11, 2023 12:27 AM - edited Jun 11, 2023 05:50 AM

Hello @kuovonne thanks a lot.

Unfortunately I got an error and I guess it is because {field2} is a formula field (although it outputs a number).

Field2 has this formula and I guess I have to convert the result to a number somehow: IF({Length} = '1 Year', '6', IF({Length} = '2 Years', '12')))

M.

---**UPDATE: **

I converted the result of the formula in Field2 to a number and it did work then 😀. Thanks @kuovonne