Good evening! Members in forum

Can you help me to solve this problem by VBA

I have two arrays like picture below (example), I want to check if element in array A is made up of sum of two or more elements in array B. Sum of elements in array A equal to elements in array B.

This example can be described:

*Option Base 1 [The first ordinary element in array is 1]*

Loop through elements in array A, we find that

A[1] = B[1] + B[3] + B[4], ==> **A[1] & B[1]; B[3]; B[4] will be eliminated.**

A[2] = 30 can't not be result of sum of two or more remains. [5,10,10,24,13] ==> **They are ignored**

A[3] = B[2] + B[5] ==> **A[3] & B[2]; B[5] will be eliminated.**

A[4] = 17 can't not be result of sum of two or more remains. [10,24,13] ==> **They are ignored**

So we have A[1] = 0, A[2] = 30 , A[3] = 0, A[4] = 17

B[1] = B[2] = B[3] = B[4] = B[5] = 0, B[6] = 10, B[7] = 24, B[8] = 13

Two array is a simple example, Can any one help me with many elements Array? Thank