Conditional Data Validation using one list

welshgasman

Well-known Member
Joined
May 25, 2013
Messages
1,329
Office Version
  1. 2007
Platform
  1. Windows
Hi all,
I have an Excel workbook that I use on my Android phone.
In that workbook I have a dropdown for a list of passengers that are on another sheet. This works great. I also have another dropdown for destinations.

Sadly however, as the people we take are elderly, several have recently passed away. Several have moved out of the area to residential homes.
So now I want to remove them from the current drop down, so I cannot inadvertently select them and they reduce the choices available. I cannot just delete them, as they are also present in a Master workbook, which keeps track of everything since I joined the Community Car Scheme. This workbook is my Monthly passenger trips sheet.

I can put in an extra column into the named range, which indicates Deceased/Moved Out of Area, anyone not current.
My dilemma is how do I use that to restrict the list that is presented in the dropdown?. I have googled Conditional Validation, but they all appear to have to use two lists and I want to keep it at just the one.?

If this was Access, then I would just use add the criteria to the combo source. How can I do something similar in Excel?

TIA
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
are you still using excel version 2007?
 
Upvote 0
For the moment, I have sorted the Passenger sheet with the current status first, before names and titles.
This at least put them at the bottom of the list.

I might well have to live with it like that. No big deal really, but if they can be removed from the list for selection all the better. :)

Thanks.
 
Upvote 0
how about referencing a separate range for the data validation

if names in column I - which is the full list of names
then add another criteria in J
for example
Active
and the create another list for just active and use that for your data validation
you could even have an if as to which range to use - based on another cell

this formula should work OK in 2007 version
=IFERROR(INDEX($I$2:$I$22,SMALL(IF($J$2:$J$22="active",ROW($K$2:$K$22)),ROW(1:1))-1,1),"")

latest version 365 - has FILTER()

Book4
IJMN
1
2name1activename1
3name2NON-Activename3
4name3activename5
5name4NON-Activename7
6name5activename9
7name6NON-Activename11
8name7activename13
9name8NON-Activename15
10name9activename17
11name10NON-Activename19
12name11activename21
13name12NON-Active 
14name13active 
15name14NON-Active 
16name15active 
17name16NON-Active 
18name17active 
19name18NON-Active
20name19active
21name20NON-Active
22name21active
Sheet1
Cell Formulas
RangeFormula
N2:N18N2=IFERROR(INDEX($I$2:$I$22,SMALL(IF($J$2:$J$22="active",ROW($K$2:$K$22)),ROW(1:1))-1,1),"")
 
Upvote 1
Solution
That looks pretty neat. (y)

What is in column K, and L which appear to be hidden?, as I need to know to translate to my sheet.?
 
Upvote 0
filter function which is not available on your version
just to check the older version

here it is removed

Book7
HIJKLMN
1
2name1activename1
3name2NON-Activename3
4name3activename5
5name4NON-Activename7
6name5activename9
7name6NON-Activename11
8name7activename13
9name8NON-Activename15
10name9activename17
11name10NON-Activename19
12name11activename21
13name12NON-Active 
14name13active 
15name14NON-Active 
16name15active 
17name16NON-Active 
18name17active 
19name18NON-Active
20name19active
21name20NON-Active
22name21active
Sheet1
Cell Formulas
RangeFormula
N2:N18N2=IFERROR(INDEX($I$2:$I$22,SMALL(IF($J$2:$J$22="active",ROW($K$2:$K$22)),ROW(1:1))-1,1),"")
 
Upvote 0
Ok, that Small has be baffled I admit. :(
However I am trying this, and whilst it populated the first cell, copying that to the next three did not produce anything?

I am using the word Yes in column L. ?

Cell M2 has this formula
Code:
=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L$2:$L$200="Yes",ROW($K$2:$K$200)),ROW(1:1))-1,1),"")

GCD.xlsm
CDEFGHIJKLM
1First NameListBlue BadgeMilesHas My NumberNotesSortOrder1SortOrder2TitleCurrentActive Passengers
2JoyceMrs Ace, Tafarn Y PiodNo3NoAce, Mrs Tafarn Y PiodMrs YesMrs Ace
3GrahamMr Alcock, Bryn TerraceNo2NoFolding wheelchairAlcock, Mr Bryn TerraceMr Yes 
4Betty & GinaMrs Alcock, Einon CtYes2YesGina has my numberAlcock, Mrs Einon CtMrs Yes 
5 Mr Angel, Frampton RdNo2NoAngel, Mr Frampton RdMr Yes 
6 Mrs Angel, Frampton RdNo2NoAngel, Mrs Frampton RdMrs Yes 
Passengers
Cell Formulas
RangeFormula
I2:I6I2=IF(A1="","",TRIM(RIGHT(SUBSTITUTE(TRIM(A2)," ",REPT(" ",99)),99))&", "&LEFT(TRIM(A2),LEN(TRIM(A2))-LEN(TRIM(RIGHT(SUBSTITUTE(TRIM(A2)," ",REPT(" ",99)),99)))))
J2:J6J2=IF($A2="","",TRIM(B2))
K2:K6K2=LEFT(A2,FIND(" ",A2))
D2:D6D2=A2&","&CHAR(10)&B2
M2:M5M2=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L$2:$L$200="Yes",ROW($K$2:$K$200)),ROW(1:1))-1,1),"")
M6M6=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L6:$L$200="Yes",ROW($K$2:$K$200)),ROW(5:5))-1,1),"")
Named Ranges
NameRefers ToCells
_FilterDatabase=Passengers!$A$1:$H$196M2, I2
Passenger=OFFSET(Passengers!$D$2,0,0,COUNTA(Passengers!$D:$D),1)M3
Cells with Data Validation
CellAllowCriteria
G1:G6ListYes,No
L1:L6ListYes,No
E1:E6ListNo,Yes
 
Upvote 0
i'm not 100% sure what you are doing with that example

I'm assuming pulling the names in column A - based on YES in column L

to create an Active List in M

But guessing

i have simplied and added what i think you mean

Small = SMALL Function
so it returns the next value based on position

Book7
ABCDEFGHIJKLMNO
1NamexyzabcdefgCurrentActive list
2name1yesname1
3name2yesname2
4name3noname5
5name4noname6
6name5yesname7
7name6yesname10
8name7yesname11
9name8noname12
10name9noname15
11name10yesname16
12name11yesname17
13name12yesname20
14name13noname21
15name14no 
16name15yes 
17name16yes 
18name17yes 
19name18no 
20name19no 
21name20yes 
22name21yes 
Sheet1
Cell Formulas
RangeFormula
M2:M22M2=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L$2:$L$200="Yes",ROW($K$2:$K$200)),ROW(1:1))-1,1),"")
 
Upvote 0
For 2007 the formula will need to be confirmed with Ctrl Shift Enter, rather than just Enter.
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,965
Members
449,137
Latest member
yeti1016

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