Function StrToArr(str As String, delimiter As String) As VariantDim ar, nar()If (Trim(str) = "") Then ReDim nar(0) StrToArr = nar GoTo EndREnd Ifar = Split(str, delimiter)ReDim nar(UBound(ar))For i = LBound(ar) To UBound(ar) nar(i) = CDbl(ar(i))NextEndR:StrToArr = nar ' application.Average(nar) ' narEnd FunctionFunction ArrAVG(arr1 As Variant, arr2 As Variant, arr3 As Variant, arr4 As Variant) As DoubleDim Narr, AArr(3)Dim index, count As Integercount = UBound(arr1) + UBound(arr2) + UBound(arr3) + UBound(arr4) + 4ReDim Narr(count)AArr(0) = arr1AArr(1) = arr2AArr(2) = arr3AArr(3) = arr4index = 0For i = 0 To 3 For j = LBound(AArr(i)) To UBound(AArr(i)) If (CDbl(AArr(i)(j)) <> 0) Then Narr(index) = CDbl(AArr(i)(j)) index = index + 1 End If NextNextArrAVG = Application.Average(Narr)End FunctionFunction Get4AVG(s1 As String, s2 As String, s3 As String, s4 As String) As DoubleDebug.PRint s1Dim d As Stringd = "/"Get4AVG = ArrAVG(StrToArr(s1, d), StrToArr(s2, d), StrToArr(s3, d), StrToArr(s4, d))End FunctionSub test()c = StrToArr("4.10/3.87/3.74", "/")'Debug.Print cd = Get4AVG("4.10/3.87/3.74", "4.08/3.88/3.78", "", "4.09/3.90/3.79")Debug.Print dEnd Sub