View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default summing comma separated values in a range

Here is a formula solution

=SUMPRODUCT(--MID($A$1:$A$3,FIND("~",SUBSTITUTE(","&$A$1:$A$3&", ",",","~",RO
W(A1))),FIND("~",SUBSTITUTE(","&$A$1:$A$3&",",",", "~",ROW(A2)))-FIND("~",SUB
STITUTE(","&$A$1:$A$3&",",",","~",ROW(A1)))-1))

This will get the first digits, copy down a row to get the second, etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"bthoron" wrote in message
ups.com...
I have a range of cells filled with comma separated values e.g.

8,2,0,0,1,0,0
3,0,7,1,0,0,2
5,0,3,0,2,0,2

I'd like to be able to total the values:

16,2,10,1,3,0,4

Right now I use a function that adds the 1st argument of each
individual cell (I have to identify each one) and the then a second
function for the next argument and so on... (too much typing of ab123
etc. I'd really like to simplify the work and be able to have one
function work for any range of cells.

The reason for the comma separated values was an attempt to make the
data easier to read (fewer columns).


thanks