View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
mark mark is offline
external usenet poster
 
Posts: 33
Default simplification problem (only for expert!)

becouse exist just nacessary condition...
read carefully my post
i'd like resolve in VBA..

-----Original Message-----
Hi
why not use a formula for this?. e.g.
=SUM(LARGE(A1:A100,{1,2}))


-----Original Message-----
Hi,
I struggling with the following problem.
I have in two column data:
column1 column2
200 10
30 50
50 40
10 20
....etc. thousand records

I'd like find max sum (two elements) of column1.
Nacessary condition: sum of these two element in column2
70.

E.G. satisfy condition is:
sum of column1: 30+50 = 80
becouse condition is fulfil, sum of column2: 50+40 70

How resolve this task in VBA by selection and iteration??
Many thanks in anticipation.
Regards
Mark

.

.