April 2018

If anyone could help me,

Thank you in advance.

first number comma space second number comma space third number

then the following macro will get you the result in B1

A formula can be built up but for me it will be complicated.

The macro is:

Sub test() Dim j, j1, k, k1, m, m1, n j = InStr(Range("a1").Value, ",") j1 = Left(Range("A1").Value, j - 1) k = InStr(j + 1, Range("A1").Value, ",") k1 = Mid(Range("A1").Value, j + 2, k - 4) m1 = Right(Range("A1").Value, Len(Range("A1").Value) - k) n = WorksheetFunction.Sum(j1, k1, m1) 'MsgBox n Range("B1") = n End Sub

Thanks to venkat1926 for this tip on the forum.

- Excel – One cell calculation
- One cell calculation Excel - Time Interval (Solved) » Forum - Excel
- Excel if cell contains text (Solved) » Forum - Excel
- Excel if cell color is red then » How-To - Excel
- Changing cell background color based on another cells background » Forum - Excel
- Copy data onto sheet only if cell has text [Solved] (Solved) » Forum - Excel