Reputation: 6555
I have some info like below:
3/7
4/6
5/1
And I want a formula that will add them up to a total based on the numbers on either side of the slash. So the result cell from the above would be: 12/14
. Anyone know how I can do this? Please let me know if this is not clear. Thanks!
Upvotes: 3
Views: 19045
Reputation: 5567
Assuming data in A1:A3, you could enter this in A4:
=SUMPRODUCT(--LEFT(A1:A3,FIND("/",A1:A3)-1))&"/"&SUMPRODUCT(--REPLACE(A1:A3,1,FIND("/",A1:A3),0))
Upvotes: 5
Reputation: 1173
Well you can explode the contents of the cell using the LEFT/RIGHT and FIND function, from there you can add them :) Add two columns
=LEFT(A1,FIND("/",A1)-1)
=RIGHT(A1,LEN(A1)-FIND("/",A1))
Those should explode the strings into the numbers, then add them and merge them.
Upvotes: 0