+ Reply to Thread
Results 1 to 44 of 44

Sum of comma seperated values in cell(Reposting)

  1. #1
    Registered User
    Join Date
    11-10-2004
    Location
    India
    Posts
    40

    Question Sum of comma seperated values in cell(Reposting)

    Hi All,
    Can anyone help me in writting a formula to find the sum of comma separated numbers in a cell
    Thanks in advance

  2. #2
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  3. #3
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  4. #4
    Registered User
    Join Date
    11-10-2004
    Location
    India
    Posts
    40

    Thumbs up Thanks Bob and Harlanb foy your formula.

    Thanks Bob and Harlanb foy your formula.
    It's really wonderful.I tried this formula for some time but i couldn't reach no where near this approach .Really MasterPiece

    But Bob could you explain logic behid this formula.I tried stepping through your formula but couldn't find any clue about your logic .Iam a newbie .Could you help me in understanding the approach you have taken in this formula so that next time i cloud write awesome formulas like this

    Thanks
    Xcelion

  5. #5
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  6. #6
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  7. #7
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  8. #8
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  9. #9
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  10. #10
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  11. #11
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  12. #12
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  13. #13
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  14. #14
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  15. #15
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  16. #16
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  17. #17
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  18. #18
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  19. #19
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  20. #20
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  21. #21
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  22. #22
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  23. #23
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  24. #24
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  25. #25
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  26. #26
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  27. #27
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  28. #28
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  29. #29
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  30. #30
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  31. #31
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  32. #32
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  33. #33
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  34. #34
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  35. #35
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  36. #36
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  37. #37
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  38. #38
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  39. #39
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  40. #40
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  41. #41
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  42. #42
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




  43. #43
    Harlan Grove
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote...
    >Can anyone help me in writting a formula to find the sum of comma
    >separated numbers in a cell

    ....

    Comma-separated numbers in a single cell? Not easy. You'd need to parse the
    cell's text into an array and sum the array. Possible but ugly. If the these
    numbers were in cell A1, the *array* formula would look like

    =SUM(--MID(A1,SMALL(IF(MID(","&A1,seq,1)=",",seq),
    ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,seq,1)=","))))),
    SMALL(IF(MID(A1&",",seq,1)=",",seq),ROW(INDIRECT("1:"&
    COUNT(1,1/(MID(A1,seq,1)=",")))))-SMALL(IF(MID(","&A1,
    seq,1)=",",seq),ROW(INDIRECT("1:"&COUNT(1,1/(MID(A1,
    seq,1)=",")))))))

    Note that this needs a defined name like seq in the formula above referring
    to an array of serial numbers beginning with one, like

    seq referring to =ROW(INDIRECT("1:1024"))



  44. #44
    Bob Phillips
    Guest

    Re: Sum of comma seperated values in cell(Reposting)

    Here is an alternative that doesn't need the named range and is *not* an
    array formula

    =SUMPRODUCT(--MID(A1,FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&L
    EN(A1)-LEN(SUBSTITUTE(A1,B1,""))+1)))),
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("2:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+2))))-
    FIND("~",SUBSTITUTE(B1&A1&B1,B1,"~",ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE
    (A1,B1,""))+1))))-1))

    THis version assumes the list in A1, and the separator character in cell B1
    --

    HTH

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


    "xcelion" <xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com> wrote in
    message news:xcelion.1u5m2e_1124694331.4581@excelforum-nospam.com...
    >
    > Hi All,
    > Can anyone help me in writting a formula to find the sum of comma
    > separated numbers in a cell
    > Thanks in advance
    >
    >
    > --
    > xcelion
    > ------------------------------------------------------------------------
    > xcelion's Profile:

    http://www.excelforum.com/member.php...o&userid=16287
    > View this thread: http://www.excelforum.com/showthread...hreadid=397670
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1