Thanks Andy,
The reason I asked was because as coded it was a bit specific, and it
doesn't work for a string of say 1;2;3;4 or 11;21;31;41, and I was hoping
that your actual data had forced you to take a look and you had improved
upon it.
As you hadn't, I took another look. I also found that this 0.120;0.140;0.255
didn't work, so that gave me a clue, and I found I was truncating the
extracted number strings, so the solution was simple - change the length by
1.
This is the corrected version, which will again get the wrap-around
=SUMPRODUCT(--MID(AA1,FIND("~",SUBSTITUTE(";"&AA1&";",";","~",ROW(INDIRECT("
1:"&LEN(AA1)-LEN(SUBSTITUTE(AA1,";",""))+1)))),FIND("~",SUBSTITUTE(";"&AA1&"
;",";","~",ROW(INDIRECT("2:"&LEN(AA1)-LEN(SUBSTITUTE(AA1,";",""))+2))))-FIND
("~",SUBSTITUTE(";"&AA1&";",";","~",ROW(INDIRECT("1:"&LEN(AA1)-LEN(SUBSTITUT
E(AA1,";",""))+1))))-1))
I would actually put the delimiter value in to another cell, say B1, and use
a cell reference in the formula rather than the delimiter, to make it easier
to change
=SUMPRODUCT(--MID(AA1,FIND("~",SUBSTITUTE(B1&AA1&B1,B1,"~",ROW(INDIRECT("1:"
&LEN(AA1)-LEN(SUBSTITUTE(AA1,B1,""))+1)))),FIND("~",SUBSTITUTE(B1&AA1&B1,B1,
"~",ROW(INDIRECT("2:"&LEN(AA1)-LEN(SUBSTITUTE(AA1,B1,""))+2))))-FIND("~",SUB
STITUTE(B1&AA1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(AA1)-LEN(SUBSTITUTE(AA1,B1,""
))+1))))-1))
BTW, when I copy a long formula like this from an NG posting, I just paste
it into the formula bar, and goto the end of each line and just do a one
character delete to sort it.
Regards
Bob