find first occurrence, then 2nd occurrence in another cell

Hsibbs

Board Regular
Joined
May 6, 2005
Messages
85
My cell A1 has 117 in it, on another sheet I have 100 records, 8 of which have 117 also with a name in the next cell.
eg on the 2nd sheet I have
117 in D1 and Fred Smith in E1.
117 in D2 and Gloria Jones in E2

I want a formula in cell A2 on my first sheet which finds the FIRST occurence of 117 and gives me back what is in column 2, ie Fred Smith.

I then want in cell A3 to find the SECOND occerence off 117 and give me back Gloria Smith

Any Ideas?

THANK YOU!!!!!!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Put 117 in B1 in your Sheet one, then in A2 of the same sheet enter
=IF(ROWS($D$1:$D1)<=COUNTIF('another sheet'!$D$1:$D$100,$B$1),INDEX('another sheet'!$E$1:$E$100,SMALL(IF('another sheet'!$D$1:$D$100=$B$1,ROW($D$1:$D$100)-ROW($A$1)+1),ROWS($D$1:$D1))),"")
(array formula confirm CTRL+SHIFT+ENTER)
 
Upvote 0
My cell A1 has 117 in it, on another sheet I have 100 records, 8 of which have 117 also with a name in the next cell.
eg on the 2nd sheet I have
117 in D1 and Fred Smith in E1.
117 in D2 and Gloria Jones in E2

I want a formula in cell A2 on my first sheet which finds the FIRST occurence of 117 and gives me back what is in column 2, ie Fred Smith.

I then want in cell A3 to find the SECOND occerence off 117 and give me back Gloria Smith

Any Ideas?

THANK YOU!!!!!!
See this...

http://www.mrexcel.com/forum/showpost.php?p=2696961&postcount=3

Or this...

http://www.mrexcel.com/forum/showpost.php?p=2768110&postcount=4
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

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