Sakthikumar Chinnasamy
Member
This is the value is present in A1 cell "E: 800 GBK: 400 GBG: 250 GBD: 89 GBC: 48 GBQ: 2 GB". I want result of either separate only numeric value or add the numeric value.
Function SumOnlyNumbers&(R$, Optional Delim$ = " ")
Dim a, i&, res&
a = Split(R, Delim)
For i = LBound(a) To UBound(a)
If IsNumeric(a(i)) Then res = res + a(i)
Next i
Erase a: SumOnlyNumbers = res
End Function