I have nice code to get sum of subsets in Python:
# Python3 program to print sums of
# all possible subsets.
# Prints sums of all subsets of arr[l..r]
def subsetSums(arr, l, r, sum = 0):
# Print current subset
if l > r:
print (sum, end = " ")
return
# Subset including arr[l]
subsetSums(arr, l + 1, r, sum + arr[l])
# Subset excluding arr[l]
subsetSums(arr, l + 1, r, sum)
# Driver code
arr = [5.76, 4.45, 3.2]
n = len(arr)
subsetSums(arr, 0, n - 1)
How to do same thing in Excel VBA?