Search code examples
google-sheetssplitsumgoogle-sheets-formulasummarize

Summarize two numbers from one cell separately in Google Sheets


I have multiple cells that each contain two numbers separated by a "/"

For example:

A1 = 10/2
A2 = 5/4
A3 = 8/1
A4 = 13/1

in A5, I would like to summarize everything on the left side of the "/" and on the right side of the "/". So A5 should have the output: 36/8

How do I do this?

Thanks in advance!


Solution

  • Try below formula-

    =SUM(INDEX(SPLIT(A1:A4,"/"),,1)) & "/" & SUM(INDEX(SPLIT(A1:A4,"/"),,2))
    

    Also can try-

    =JOIN("/",QUERY(INDEX(SPLIT(A1:A4,"/")),"select sum(Col1), sum(Col2) label sum(Col1) '', sum(Col2) ''"))