View Single Post
  #1   Report Post  
H3dgehog H3dgehog is offline
Junior Member
 
Posts: 5
Default VBA to find largest total of ANY two values

Good morning,

I have a list of percentage values in a column (totalling 100%). I have to run 3 specific tests against this data set:

1) Find the highest sum total of ANY two values, returning the total and the two values that make up the total.

2) Find the highest sum total of ANY three values, returning the total and the three values that make up the total.

3) Find the highest sum total of ANY four values, returning the total and the four values that make up the total.

Is there some VBA magic to look at data sets in this way?

Many thanks in advance from a first time poster!