View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jüri Kuusik Jüri Kuusik is offline
external usenet poster
 
Posts: 1
Default Finding the elements of the sum

Hello!
Can you please help me in solving following problem:

Given is the amount (for example 56,67)
and massive: (for example 45,6; -3,2; 11,07; 58)

Exercise is to show the components of the sum, which
perform given amount.

In our example the answer is

1. - 45,6
3. - 11,07

Can You give me an algorithm (and VBA code) to solve this
problem in
general - Given is N numbers (negative and positive) and
searched amount (negative or positive)?

If You have questions about problem, please ask from me:


Regards,
Jüri.