Lookup all possible surnames based on first name in another cell - for DV list

Mr__P

New Member
Joined
May 6, 2016
Messages
7
I have a table containing education assessment data and need to use the data to analyse a child's data on another worksheet. So far I have set up 3 drop down boxes that contain 'First Name', 'Surname', 'Class'.

I have set up these to look at the fields in the table but I would like it so that when I select a 'First Name', the 'Surname' drop down shows only the possible surnames that match the first name rather than all the surnames in the table.

The worksheet successfully looks up the correct data based on matching all three drop-downs to records in the table so this isn't the issue. I just want to make it more user friendly.

Many thanks.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
try this

data validation for A2, =$F$2:$F$500
and B2, =$G$2:$G$500


Excel 2012
ABCDEFG
1First NameSurnameFirst NameSurname
2AlanName1AlanName1AlanName1
3AlanName2SteveName2
4AlanName3KeithName3
5AlanName4Name4
6SteveName5
7SteveName6
8SteveName7
9KeithName8
10KeithName9
11KeithName10
12KeithName11
13KeithName12
6
Cell Formulas
RangeFormula
F2{=IFERROR(INDEX($D$2:$D$13, MATCH(0, COUNTIF($F$1:F1, $D$2:$D$13), 0)),"")}
G2{=IFERROR(INDEX($E$2:$E$500,SMALL(IF($D$2:$D$500=$A$2,ROW($E$2:$E$500)-1),ROW(E1))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,216,037
Messages
6,128,442
Members
449,453
Latest member
jayeshw

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