nth Occurrence lookup within an array returning from specific column

Safire

New Member
Joined
Mar 3, 2015
Messages
2
Hello,
I'm trying to do a nth occurrence lookup (probably with a macro), among an array of data and returning the value from a specific column within the same row.

I'm trying to look up student scholarship assignments from the following data:
Scholarship Name
Awardee Student#1
Awardee Student#2
Awardee Student#3
Awardee Student#4
Louis Jones Scholarship
Jonah Band, Class of 2017
Sean Ascot, Class of 2017
Ashley Verra, Class of 2015
Josh Dean, Class of 2018
Blank-Smith Scholarship
Jane Smith, Class of 2018
Jonah Band, Class of 2017
Foundation Scholarship
John Smith, Class of 2015
Class of 1910 Scholarship
Jonah Band, Class of 2017
Nikki McGuire, Class of 2018
Dr. Doug Scholarship
Josh Dean, Class of 2018
Jane Smith, Class of 2018
John Smith, Class of 2015
Sean Ascot, Class of 2017
Daniel Scholarship
Jane Smith, Class of 2018
Sean Ascot, Class of 2017

<tbody>
</tbody>


On a different tab, using the student name as the lookup, the 1st occurrence of the scholarship name would appear in column B, the second scholarship in column C, etc. It would always be returning the data from the scholarship name column.

Student Name for lookup
Scholarship Assignment #1
Scholarship Assignment #2
Scholarship Assignment #3
Jane Smith, Class of 2018
Blank-Smith Scholarship
Dr. Doug Scholarship
Daniel Scholarship
John Smith, Class of 2015

<tbody>
</tbody>


I'm rather new to using macros, my experience being limited to cutting and pasting code. So I'm hoping for some assistance.

Thank you for your help!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
try:


Book1
ABCDE
1Scholarship NameAwardee Student#1Awardee Student#2Awardee Student#3Awardee Student#4
2Louis Jones ScholarshipJonah Band, Class of 2017Sean Ascot, Class of 2017Ashley Verra, Class of 2015Josh Dean, Class of 2018
3Blank-Smith ScholarshipJane Smith, Class of 2018Jonah Band, Class of 2017
4Foundation ScholarshipJohn Smith, Class of 2015
5Class of 1910 ScholarshipJonah Band, Class of 2017Nikki McGuire, Class of 2018
6Dr. Doug ScholarshipJosh Dean, Class of 2018Jane Smith, Class of 2018John Smith, Class of 2015Sean Ascot, Class of 2017
7Daniel ScholarshipJane Smith, Class of 2018Sean Ascot, Class of 2017
8
9
10
11
12Student Name for lookupScholarship Assignment #1Scholarship Assignment #2Scholarship Assignment #3
13Jane Smith, Class of 2018Blank-Smith ScholarshipDr. Doug ScholarshipDaniel Scholarship
14John Smith, Class of 2015Foundation ScholarshipDr. Doug Scholarship
Foglio1
Cell Formulas
RangeFormula
B13{=IFERROR(INDEX($A$2:$A$7,SMALL(IF($B$2:$E$7=$A13,ROW($A$2:$A$7)-ROW($A$2)+1),COLUMNS($B$13:B13))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You are welcome I' m glade it helped you
Thank you For Your feed-back
 
Upvote 0

Forum statistics

Threads
1,215,695
Messages
6,126,261
Members
449,307
Latest member
Andile

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