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!
CodePudding user response:
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) ''"))
CodePudding user response:
try:
=INDEX(JOIN("/", MMULT(TRANSPOSE(SPLIT(A1:A4, "/")), {1;1;1;1})))
CodePudding user response:
Alternatively:
Formula in B1
:
=JOIN("/",INDEX(QUERY(SPLIT(A1:A4,"/"),"select Sum(Col1), Sum(Col2)"),2))