Option Explicit Sub test() Dim arr, i, t arr = Range("c3:c" & [c65536].End(xlUp).Row) For i = 1 To UBound(arr, 1) t = Split(arr(i, 1), IIf(InStr(arr(i, 1), "+") > 1, "+", "-")) arr(i, 1) = Sqr(t(0) ^ 2 + (Replace(t(1), "i", vbNullString)) ^ 2) Next [d3].Resize(UBound(arr, 1), UBound(arr, 2)) = arr End Sub