以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求助 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=15065) |
-- 作者:布莱克朱 -- 发布时间:2011/12/11 17:00:00 -- 求助 单元格输入了 银行,2000 卡号,1000 我想自动相加里面的数字.
[此贴子已经被作者于2011-12-11 17:10:31编辑过]
|
-- 作者:狐狸爸爸 -- 发布时间:2011/12/11 20:44:00 -- Dim sum As Double Dim s As String = "银行,2000 卡号,1000" s = s.replace(" ",",") Dim vals() As String = s.split(",") For Each v As String In vals If Isnumeric(v) Then sum = sum + cdbl(v) End If Next output.show(sum) |