How to add two cells in excel whose values are separated by a slash?

Viewed 258

I have these values in an excel sheet: A1: 6/15, B1:10/3.

I want to add these cells. I used the following formula, but it doesn't work:

=LEFT (A1, 1) + LEFT(B1, 1) + LEFT (B1, 2)&"/"&RIGHT (A1, 1) +
     RIGHT (A1, 2) + RIGHT (B1, 1)

Please help me. What am I doing wrong? How should I change the formula to make it work?

2 Answers

Try this formula, which isolates and then divides the numbers on either side of the slash:

=LEFT(A1, SEARCH("/",A1,1)-1) / RIGHT(A1,LEN(A1) - SEARCH("/", A1, 1))

If you also want a higher level summation or product of multiple such cells, then just use the above formula and then add those cells.

I think you are looking for:

=SUMPRODUCT(LEFT(A1:B1,SEARCH("/",A1:B1)-1)*1)&"/"&SUMPRODUCT(REPLACE(A1:B1,1,SEARCH("/",A1:B1),"")*1)

enter image description here

Related