Sum Left Side & Right Side Numbers

R

Rob

I'm hoping someone can help with this.

I'm trying to sum all the numbers on the left of a '/' and the the numbers
on the right of the same.

Example:
22/55
0/7
1/125
216/0

I trying to find a way to make the sumproduct provide the result of...
239/187.

So far for the right side I have...

=SUMPRODUCT(--(MID(R2:R4,FIND("/",R2:R4,1)+1,3)))

.... But I can't seem to get the Left side to work.


Thanks In Advance.
Rob
 
T

T. Valko

Assuming *every cell* contains the slash ( / )...

=SUMPRODUCT(--(LEFT(R2:R5,FIND("/",R2:R5)-1)))&"/"&SUMPRODUCT(--(MID(R2:R5,FIND("/",R2:R5)+1,3)))
 
G

Gary''s Student

=SUMPRODUCT(--LEFT(R1:R4,FIND("/",R1:R4)-1)) & "/" &
SUMPRODUCT(--(MID(R1:R4,FIND("/",R1:R4,1)+1,3)))
 
C

Charabeuh

Hello,

Another way with a formula array
(validate the formula with Ctrl+Shift+Enter instead with Enter)

SUM(TRUNC(SUBSTITUTE(R2:R5,"/","."))) & "/" & SUM( -- MID(R2:R5,
SEARCH("/",R2:R5)+1,99))
 
R

Ron Rosenfeld

I'm hoping someone can help with this.

I'm trying to sum all the numbers on the left of a '/' and the the numbers
on the right of the same.

Example:
22/55
0/7
1/125
216/0

I trying to find a way to make the sumproduct provide the result of...
239/187.

So far for the right side I have...

=SUMPRODUCT(--(MID(R2:R4,FIND("/",R2:R4,1)+1,3)))

... But I can't seem to get the Left side to work.


Thanks In Advance.
Rob


=SUMPRODUCT(--LEFT(rng,FIND("/",rng)-1))&"/" &
SUMPRODUCT(--MID(rng,FIND("/",rng)+1,99))

Be aware that this formula type (using FIND) will only work if
All the entries are text
All the entries contain a "/"

--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top