ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum Left Side & Right Side Numbers (https://www.excelbanter.com/excel-worksheet-functions/256731-sum-left-side-right-side-numbers.html)

Rob

Sum Left Side & Right Side Numbers
 
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. Valko

Sum Left Side & Right Side Numbers
 
Assuming *every cell* contains the slash ( / )...

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

--
Biff
Microsoft Excel MVP


"Rob" wrote in message
...
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




Gary''s Student

Sum Left Side & Right Side Numbers
 
=SUMPRODUCT(--LEFT(R1:R4,FIND("/",R1:R4)-1)) & "/" &
SUMPRODUCT(--(MID(R1:R4,FIND("/",R1:R4,1)+1,3)))

--
Gary''s Student - gsnu201001


"Rob" wrote:

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


Charabeuh[_5_]

Sum Left Side & Right Side Numbers
 
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))



"Rob" wrote:

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


Ron Rosenfeld

Sum Left Side & Right Side Numbers
 
On Thu, 18 Feb 2010 09:53:01 -0800, Rob wrote:

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


All times are GMT +1. The time now is 04:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com