Function to extract specific records

D

Dee

I have a spreadsheet that has the same Sample ID in more
than one row. Is there a functin in Excel 2000 that would
allow me to extract from the rows containing the same
sample ID only those if totaled would equal say 800. For
example the list below has the Sample ID CLE-3993 in 7
rows. Is there a function that would allow me to ask
Excel to look at each occurance of the same Sample ID and
return only the rows that when totaled would equal 800.
This would mean it would return only 3 records that would
sum to equal 800, row 1, 2, and 5 for example.

Sample ID Aliquot # Current Amt
CLE-3993 4 150
CLE-3993 5 150
CLE-3993 6 150
CLE-3993 7 150
CLE-3993 8 500
CLE-3993 9 500
CLE-3993 13 500
CLE-3995 8 500
CLE-3995 9 500
CLE-3995 10 500
CLE-3995 11 500
CLE-3995 12 500
CLE-3996 6 150
CLE-3996 7 150
CLE-3996 8 500
CLE-3996 9 500
CLE-3996 10 500
CLE-3996 11 500
CLE-3996 12 500
CLE-3996 13 500
CLE-4008 5 150
CLE-4008 6 150
CLE-4008 7 150
CLE-4008 8 500
CLE-4009 1 600
CLE-4009 2 150
CLE-4009 3 150
CLE-4009 4 150
CLE-4009 13 500
CLE-4010 1 600
CLE-4010 2 150
CLE-4010 3 150

Thank you in advance for any help.

Regards

Dee
 
J

Jacques Brun

Dee,
I think you will hardly find a function that conforms
exactly to what you are requesting. Would the following
considerations help you to progress :

On a 4th column you could use the following formula to
calculate the Current Amt sum for all records with the
same Sample ID :

=SUMIF($A$1:$A$33,A2,$C$1:$C$33)
(formula in Cell D2 to be dragged through column D)

You can also limit the sum to the rows from the top to the
current one :

=SUMIF($A$1:$A2,A2,$C$1:$C2)
(formula in Cell D2 to be dragged through column D)

This one gives an answer for CLE-3996 with the sum of rows
14 to 16 totalling 800 as shown by a value of 800 in D16

You may want to sort your data by ascending or descending
amount. In descending order a value of 800 in cell D24
shows a solution for cle-4008.

Regards
Jacques
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top