Search code examples
google-sheetssplitgoogle-sheets-formulafractionsgoogle-query-language

Extract fractions numbers from text and sum - odd results?


I have a cell containing fractions as text, like:

2/4 + 2/4 +2/4

I want to extract fractions as numbers, and sum them.

I tried a simple:

=SPLIT(A2, "+") 

that correctly split numbers in three columns

and then

=SUM(SPLIT(A2, "+"))

but got this wrong result:

4/19

Can you help understand how to get right result?

enter image description here


Solution

  • try:

    =INDEX(QUERY(, "select "&A2), 2)
    

    enter image description here