ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find the sum of Comma Seperated Values In a Cell (https://www.excelbanter.com/excel-worksheet-functions/41248-find-sum-comma-seperated-values-cell.html)

xcelion

Find the sum of Comma Seperated Values In a Cell
 

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
------------------------------------------------------------------------
xcelion's Profile: http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=397168


sirknightly

Xcelion,

There isn't a native Excel function that can do this, but you can write one easily enough. Drop this function into VB:

---------------------
Function Sum_CSV(CSV_String)

CSV_Temp = "=SUM(" & CSV_String & ")"

Sum_CSV = Evaluate(CSV_Temp)

End Function
---------------------

then use the function as you would any other:

=Sum_CSV(A1)

Knightly

Quote:

Originally Posted by xcelion
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
------------------------------------------------------------------------
xcelion's Profile: http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=397168


xcelion


Thanks sirknightly for you answer

This looks fine But i would like to know whether this can be expresses
as formula


--
xcelion
------------------------------------------------------------------------
xcelion's Profile: http://www.excelforum.com/member.php...o&userid=16287
View this thread: http://www.excelforum.com/showthread...hreadid=397168


dominicb


Good morning xcelion

As sirknightly says it can't be done by Excel without resorting to
writing your own function - and the one he supplied works just fine.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=397168



All times are GMT +1. The time now is 07:58 PM.

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