Sum of Elements in array

How get Sum elements in Array of Variable type String
Ex: vArray={123.00, 1234,00, 124.00,-------------,234.00}

Assign Sum=0 variable as double
Iterate Array using For Each
Assign
Sum=Sum+cdbl(item.tostring)

2 Likes

@Thi
Lets assume that in your sample the 1234,00 was a Typo and values come along in the Clean Form of decimal seperaten with a dot, then following can be used

YourArrayVar.Sum(function (x) CDbl(x))

Otherwise WE can Setup a customized Double Format converter, dealing with different Forms of value represenations

2 Likes