matching identical values.

T

tony lindsley

I am using the following formula to return values when a cell is equal to
that on a worksheet. First of all i use the countIF scenario to count all the
items that are identical. Then an address to work out the position and
finally match to find the relevant data which is on the same line. my problem
is that when it finds the first set of data it returns this and the following
number of rows that match the count instead of the first set of data, the
second set and so on. can anyone help please?
(worksheet2 formula used to match data from worksheet 1.)

=COUNTIF(worksheet1!B:B,A1)
1st line
=IF($C$1>B4,CELL("address",OFFSET(worksheet1!B1,MATCH($A$1,worksheet1!B:B,0)-1,0)),"")
=IF($C$1>=$B4,OFFSET(worksheet1!$B1,MATCH($A$1,worksheet1!$B:$B,0)-1,0),"")
=IF($C$1>=$B4,OFFSET(worksheet1!$B1,MATCH($A$1,worksheet1!$B:$B,0)-1,-1),"")
2nd lin
=IF($C$1>B5,CELL("address",OFFSET(INDIRECT(A4,1),MATCH($A$1,INDIRECT(A4):worksheet1!B10000, 0),0)),""
=IF($C$1>=$B5,OFFSET(INDIRECT($A4,1),MATCH($A$1,INDIRECT($A4):worksheet1!$B10000, 0),0),""
=IF($C$1>=$B5,OFFSET(INDIRECT($A4,1),MATCH($A$1,INDIRECT($A4):worksheet1!$B10000, 0),-1),"")
then the second line repeating
 

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