-1

I have the following problem:
I need to add the 4 columns F2:I2 I have tried with this formula =ARRAYFORMULA(SUM(SPLIT(F2:I2," + "))) but I don't know what the error is, it only adds me what is in cell F2 Thank you in advance if you can give me a hand...

I took a screenshot of what I have done but I can't find what to modify in the formula, if you can help me I know that it is missing some function so that it can add the four cells.

Thank you

enter image description here

TheMaster
  • 45,448
  • 6
  • 62
  • 85
  • 1
    Make sure to add input and expected output as **text table** (NOT as IMAGE/LINK) to the question. [Click here](https://webapps.stackexchange.com/a/161855/) to create a table easily. Adding such tables greatly increases your chances of getting a elegant answer, as **it is easier to copy/paste**. If you share spreadsheets, your question maybe closed, as questions here must be [self contained](https://meta.stackoverflow.com/a/260455). Your table should be a [mre].[Your email address can also be accessed by the public](https://meta.stackoverflow.com/questions/394304/), if you share Google files. – TheMaster Oct 27 '22 at 10:27
  • Related: https://stackoverflow.com/a/60572037 – TheMaster Oct 27 '22 at 18:02
  • ok it won't happen again, I'm a newbie... – user20345194 Oct 28 '22 at 02:34
  • @user20345194 if you edit your original question and add the details in the image into a table that we can copy and paste and be more specific as to how you want the output to look I can vote to reopen. I think it’s a fine question but just incomplete because of ambiguity. – CodeCamper Oct 28 '22 at 03:25

3 Answers3

1

Can you try:

=SUM(SPLIT(TEXTJOIN("+",1,F2:I2),"+"))
JvdV
  • 70,606
  • 8
  • 39
  • 70
0

The following will add up as you asked:

=sum(map(f2:I2, lambda(fox,sum(split(fox," + ")))))
CodeCamper
  • 6,609
  • 6
  • 44
  • 94
0

try:

=INDEX(QUERY(; "select "&TEXTJOIN(","; 1; F2:I2)); 2)

enter image description here

and then just sum it:

=SUM(INDEX(QUERY(; "select "&TEXTJOIN(","; 1; F2:I2)); 2))

or:

=INDEX(QUERY(; "select "&TEXTJOIN("+"; 1; F2:I2)); 2)

if F2:I2 has always values:

=INDEX(QUERY(; "select "&JOIN("+"; F2:I2)); 2)

if not then:

=INDEX(QUERY(; "select "&JOIN("+"; F2:I2*1)); 2)

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124