trying to get data out of a table based on multiple variables

aslawson

New Member
Joined
Jan 9, 2015
Messages
3
Hello all,

I am trying to write a program to extract data from a table based on a series of parameters any help would be greatly appreciated as it is prooving to be beyond my excel knowledge.

ie

from the first column i want to identify rows that add up to a value that I input into a cell ie "x" that also correspond to the lowest value of the sum of the same rows in fourth column and the highest value of the same rows in the third column.

I also want to ensure that the identified rows add up to a value in column two that is either in a range that I can set, equal to, more than or less than. "y"

ie if x = 100,000 and y > 45,000


7000035000105000 $ 2,065.00
7100035000106000 $ 2,094.50
7200035000107000 $ 2,124.00
7300035000108000 $ 2,153.50
7400035000109000 $ 2,183.00
7500035000110000 $ 2,212.50
7600035000111000 $ 2,242.00
7700035000112000 $ 2,271.50
500002250072500 $ 1,475.00
7800035000113000 $ 2,301.00
7900035000114000 $ 2,330.50
510002250073500 $ 1,504.50
8000035000115000 $ 2,360.00
520002250074500 $ 1,534.00
530002250075500 $ 1,563.50
540002250076500 $ 1,593.00
550002250077500 $ 1,622.50
560002250078500 $ 1,652.00
250001000035000 $ 737.50
570002250079500 $ 1,681.50
580002250080500 $ 1,711.00
260001000036000 $ 767.00
590002250081500 $ 1,740.50
600002250082500 $ 1,770.00
270001000037000 $ 796.50
610002250083500 $ 1,799.50
620002250084500 $ 1,829.00
630002250085500 $ 1,858.50
280001000038000 $ 826.00
640002250086500 $ 1,888.00
650002250087500 $ 1,917.50
290001000039000 $ 855.50
660002250088500 $ 1,947.00
670002250089500 $ 1,976.50
300001000040000 $ 885.00
15000500020000 $ 442.50
680002250090500 $ 2,006.00
690002250091500 $ 2,035.50
310001000041000 $ 914.50
320001000042000 $ 944.00
16000500021000 $ 472.00
330001000043000 $ 973.50
340001000044000 $ 1,003.00
17000500022000 $ 501.50
350001000045000 $ 1,032.50
360001000046000 $ 1,062.00
18000500023000 $ 531.00
370001000047000 $ 1,091.50
380001000048000 $ 1,121.00
19000500024000 $ 560.50
390001000049000 $ 1,150.50
400001000050000 $ 1,180.00
20000500025000 $ 590.00
410001000051000 $ 1,209.50
420001000052000 $ 1,239.00
21000500026000 $ 619.50
430001000053000 $ 1,268.50
440001000054000 $ 1,298.00
22000500027000 $ 649.00
450001000055000 $ 1,327.50
460001000056000 $ 1,357.00
23000500028000 $ 678.50
470001000057000 $ 1,386.50
480001000058000 $ 1,416.00
24000500029000 $ 708.00
490001000059000 $ 1,445.50
500010006000 $ 147.50
600010007000 $ 177.00
700010008000 $ 206.50
800010009000 $ 236.00
9000100010000 $ 265.50
10000100011000 $ 295.00
11000100012000 $ 324.50
12000100013000 $ 354.00
13000100014000 $ 383.50
14000100015000 $ 413.00
400004000 $ 118.00
300003000 $ 88.50
200002000 $ 59.00
100001000 $ 29.50

<colgroup><col span="4"></colgroup><tbody>
</tbody>


<colgroup><col span="6"></colgroup><tbody>
</tbody>
Thanks

Andrew
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
please restate the question with only 5 rows and 2 digit numbers

can you have any number of numbers in first column adding to the total
if so it is a lot of combinations
 
Upvote 0
Hello oldbrewer,

Please see a table below with 5 rows and max of 2 digit numbers.

As to the first column unfortunately it can have any number of combinations however typically there is only one solution that matches all the criteria and this is typically dependent upon the 4th column.


x=80
y < 20

10 2 12 3
20 3 23 6
30 4 34 9
40 5 45 12
50 10 60 15
 
Upvote 0
so 40,30,10 50,30 50,20,10 all sum to 80

so col 2 11 - 14 - 15

fourth column is 24, 24, 24

third column is 91, 94, 95

please restate your criteria in these terms
 
Upvote 0
So with this number set there were three possible options in the 1st column that summed to 80 as you identified.

Of these three possibilities I was then looking for the lowest value in column 4. (This scenario they are all the same)

At the same time look at column 3 for the highest value which happens to be 95.

therefore seeing that 95 is the highest identified then the option identifying rows 50 20 10 would be the solution to this problem





so 40,30,10 50,30 50,20,10 all sum to 80

so col 2 11 - 14 - 15

fourth column is 24, 24, 24

third column is 91, 94, 95

please restate your criteria in these terms
 
Upvote 0
what if column 4 was 24,24,23 and fourth column 91,94,95

does a single lowest value in column 4 take precedence over a single highest value in column ?
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top