Rajesh Sinha
Rajesh Sinha

Reputation: 197

Sum value separated by Delimiter

In a Column I'm counting score per ball, are like

10-25

10 balls 25 Runs.

I've data in Range A2:A10 and I'm using the following formula but getting Zero.

=SUMPRODUCT ((LEFT(A2:A10, FIND("-", A2:A10) - 1))&"-"&SUMPRODUCT ((MID(A2:A10, FIND ("-", A2:A10) +1,10))+0))

NB : It's an Array formula.

Upvotes: 0

Views: 101

Answers (1)

Tom Sharpe
Tom Sharpe

Reputation: 34230

This should fix it

=SUMPRODUCT(LEFT(A2:A10,FIND("-",A2:A10)-1)+0)&"-"&SUMPRODUCT(MID(A2:A10,FIND("-",A2:A10)+1,10)+0)

You needed to add +0 in both SUMPRODUCT's to get the strings to behave as numbers and also the brackets weren't quite right

enter image description here

Upvotes: 3

Related Questions