Dim myarr() As String
Dim myval() As Single
Dim myres() As Single
Dim i, j, k, n As Integer
Dim sum As Single
mydata = "0.12,0.34,0.5,0.3,0.28,0.6,0.56,0.2,0.5"
myarr = Split(mydata, ",")
ReDim myval(UBound(myarr))
For i = 0 To UBound(myarr)
myval(i) = Val(myarr(i))
Next i
For i = 0 To UBound(myval) - 1
n = 1
repeat:
sum = myval(i)
ReDim myres(0)
myres(0) = i
For j = (i + n) To UBound(myval)
sum = sum + myval(j)
ReDim Preserve myres(UBound(myres) + 1)
myres(UBound(myres)) = j
If sum >= 1 Then Exit For
Next j
If sum = 1 Then
For k = 0 To UBound(myres)
Debug.Print myval(myres(k)),
Next k
Debug.Print
End If
If n < UBound(myval) - i Then
n = n + 1
GoTo repeat
End If
Next i