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
 
thanks for pointing that out Fluff, I have spent much time now on 365 - i just forget thats needed now
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Yes, that is what I am trying to do based on your formula.
Somehow I am missing a step here? :(

This is what I am doing.
Copying your latest formula and pasting that simply into M2 as you have it. Then copying M2 down a few rows to see the result.
 
Upvote 0
so something is not right - based on that XL2BB example

But you are pulling names in column A - and not shown that in the XL2BB

can you post the full spreadsheet sample in XL2BB
 
Upvote 0
For 2007 the formula will need to be confirmed with Ctrl Shift Enter, rather than just Enter.
Wow, I was going to mention that, but did not see the {} ?

I did try that with no difference. :(

Following these instructions
Enter an array formula
  1. Select the cells where you want to see your results.
  2. Enter your formula.
  3. Press Ctrl+Shift+Enter. Excel fills each of the cells you selected with the result.
OK, I now have more, but same as first cell?

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 YesMrs Ace
4Betty & GinaMrs Alcock, Einon CtYes2YesGina has my numberAlcock, Mrs Einon CtMrs YesMrs Ace
5 Mr Angel, Frampton RdNo2NoAngel, Mr Frampton RdMr YesMrs Ace
Passengers
Cell Formulas
RangeFormula
I2:I5I2=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:J5J2=IF($A2="","",TRIM(B2))
K2:K5K2=LEFT(A2,FIND(" ",A2))
D2:D5D2=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),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
_FilterDatabase=Passengers!$A$1:$H$196M2:M5, I2
Cells with Data Validation
CellAllowCriteria
G1:G5ListYes,No
L1:L5ListYes,No
E1:E5ListNo,Yes
 
Upvote 0
so something is not right - based on that XL2BB example

But you are pulling names in column A - and not shown that in the XL2BB

can you post the full spreadsheet sample in XL2BB
No, sorry, that is as much as I can do with real data. :(

I will modify the names and post it then.
 
Upvote 0
=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L$2:$L$200="Yes",ROW($K$2:$K$200)),ROW(1:1))-1,1),"")
the
INDEX($A$2:$A$200
means pull the names from the column A

the rest is just to get a list based on YES

so effectively its like filter in later versions

Filter ( column A , based on column L = YES )
 
Upvote 0
No, sorry, that is as much as I can do with real data. :(

I will modify the names and post it then.
OK

Try in a new sheet
copy my XL2BB
in and then see - if it works with the very simplified data
and using {}

if it works we know its OK on 2007 version you have

then its just applying to the real data
 
Upvote 0
Sheet is too large as Mini sheet?, same with table

Is this any better?

Mr Excel GCD.xlsm
ABCDEFGHIJKLM
1NameAddressFirst NameListBlue BadgeMilesHas My NumberNotesSortOrder1SortOrder2TitleCurrentActive Passengers
22 Name2 AddressJoyce2 Name, 2 AddressNo3NoName, 2 2 Address2Yes2 Name
33 Name3 AddressGraham3 Name, 3 AddressNo2NoFolding wheelchairName, 3 3 Address3Yes2 Name
44 Name4 AddressBetty & Gina4 Name, 4 AddressYes2YesGina has my numberName, 4 4 Address4Yes2 Name
55 Name5 Address 5 Name, 5 AddressNo2NoName, 5 5 Address5Yes2 Name
66 Name6 Address 6 Name, 6 AddressNo2NoName, 6 6 Address6Yes2 Name
77 Name7 AddressMargaret7 Name, 7 AddressNo2No Needs helpName, 7 7 Address7Yes2 Name
88 Name8 AddressJudith8 Name, 8 AddressYes1YesName, 8 8 Address8Yes2 Name
99 Name9 Address 9 Name, 9 AddressNo2NoName, 9 9 Address9Yes 
1010 Name10 AddressRichard10 Name, 10 AddressNo2NoName, 10 10 Address10Yes 
1111 Name11 AddressFay & Jean11 Name, 11 AddressNo2No Name, 11 11 Address11Yes 
1212 Name12 AddressAvril12 Name, 12 AddressYes2YesName, 12 12 Address12Yes 
1313 Name13 Address 13 Name, 13 AddressNo1NoName, 13 13 Address13Yes 
1414 Name14 Address14 Name, 14 AddressNo1No£19.20 if with Howells to Mary CaveName, 14 14 Address14Yes 
1515 Name15 AddressJean15 Name, 15 AddressNo2No Name, 15 15 Address15Yes 
1616 Name16 AddressJean16 Name, 16 AddressNo1NoName, 16 16 Address16Yes 
1717 Name17 Address 17 Name, 17 AddressNo2NoName, 17 17 Address17Yes 
1818 Name18 AddressJeff18 Name, 18 AddressNo1No Name, 18 18 Address18Yes 
1919 Name19 AddressDavid19 Name, 19 AddressNo2NoName, 19 19 Address19Yes 
2020 Name20 AddressDennis & Glenys20 Name, 20 AddressYes2NoName, 20 20 Address20Yes 
2121 Name21 AddressBrian21 Name, 21 AddressYes2Yes Needs help, bad eyesName, 21 21 Address21Yes 
2222 Name22 AddressMary22 Name, 22 AddressNo1NoName, 22 22 Address22Yes 
2323 Name23 AddressAlan23 Name, 23 AddressNo2NoName, 23 23 Address23Yes 
2424 Name24 AddressAlan24 Name, 24 AddressNo2NoName, 24 24 Address24Yes 
2525 Name25 Address25 Name, 25 AddressNo3NoName, 25 25 Address25Yes 
2626 Name26 Address 26 Name, 26 AddressNo2NoName, 26 26 Address26Yes 
2727 Name27 Address27 Name, 27 AddressNo2NoName, 27 27 Address27Yes 
2828 Name28 AddressMwrddyn & Maureen28 Name, 28 AddressNo4YesName, 28 28 Address28Yes 
2929 Name29 AddressGeorge29 Name, 29 AddressYes1Yes Name, 29 29 Address29Yes 
3030 Name30 AddressKen30 Name, 30 AddressYes2NoName, 30 30 Address30Yes 
3131 Name31 Address 31 Name, 31 AddressNo1NoName, 31 31 Address31Yes 
3232 Name32 AddressAnne32 Name, 32 AddressNo2NoName, 32 32 Address32Yes 
3333 Name33 AddressMaureen & Mwrddyn33 Name, 33 AddressNo4YesVery fitName, 33 33 Address33Yes 
3434 Name34 AddressDoris34 Name, 34 AddressYes2YesWheelchair, sons Andrew & Peter.Name, 34 34 Address34Yes 
3535 Name35 AddressRita35 Name, 35 AddressNo1NoWas Alexandra RdName, 35 35 Address35Yes 
3636 Name36 AddressYvonne36 Name, 36 AddressYes2NoName, 36 36 Address36Yes 
3737 Name37 Address 37 Name, 37 AddressYes2NoName, 37 37 Address37Yes 
3838 Name38 AddressElaine38 Name, 38 AddressYes2YesName, 38 38 Address38Yes 
3939 Name39 AddressSheila39 Name, 39 AddressNo1NoName, 39 39 Address39Yes 
4040 Name40 AddressValerie40 Name, 40 AddressNo2No Name, 40 40 Address40Yes 
4141 Name41 AddressDiana41 Name, 41 AddressYes2YesName, 41 41 Address41Yes 
4242 Name42 AddressMary42 Name, 42 AddressNo5NoName, 42 42 Address42Yes 
4343 Name43 AddressPat & Hilary43 Name, 43 AddressNo2NoName, 43 43 Address43Yes 
4444 Name44 AddressPam44 Name, 44 AddressNo2NoName, 44 44 Address44Yes 
4545 Name45 AddressRoy45 Name, 45 AddressNo1NoName, 45 45 Address45Yes 
4646 Name46 AddressNancy46 Name, 46 AddressNo1YesName, 46 46 Address46Yes 
4747 Name47 AddressBabs47 Name, 47 AddressNo2NoName, 47 47 Address47Yes 
4848 Name48 AddressBabs48 Name, 48 AddressNo2NoName, 48 48 Address48Yes 
4949 Name49 AddressSarina49 Name, 49 AddressNo1YesName, 49 49 Address49Yes 
5050 Name50 AddressEvelyn50 Name, 50 AddressYes3NoWheelchairName, 50 50 Address50Yes 
5151 Name51 Address 51 Name, 51 AddressYes1YesWheelchairName, 51 51 Address51Yes 
5252 Name52 AddressJoan52 Name, 52 AddressNo3NoName, 52 52 Address52Yes 
5353 Name53 AddressLyn53 Name, 53 AddressNo1NoName, 53 53 Address53Yes 
5454 Name54 AddressClive54 Name, 54 AddressNo2YesName, 54 54 Address54Yes 
5555 Name55 Address 55 Name, 55 AddressYes2NoName, 55 55 Address55Yes 
5656 Name56 AddressDorothea56 Name, 56 AddressNo1NoName, 56 56 Address56Yes 
5757 Name57 AddressEnid57 Name, 57 AddressYes2NoName, 57 57 Address57Yes 
5858 Name58 AddressMarcia58 Name, 58 AddressNo2NoName, 58 58 Address58Yes 
5959 Name59 AddressMolly59 Name, 59 AddressNo1NoName, 59 59 Address59Yes 
6060 Name60 AddressMaureen & Carol60 Name, 60 AddressYes1NoBlindName, 60 60 Address60Yes 
6161 Name61 AddressWarren61 Name, 61 AddressNo2NoNeeds reciptName, 61 61 Address61Yes 
6262 Name62 AddressPamela62 Name, 62 AddressYes2No Name, 62 62 Address62Yes 
6363 Name63 AddressMargaret63 Name, 63 AddressYes2NoName, 63 63 Address63Yes 
6464 Name64 AddressLinda64 Name, 64 AddressNo1NoName, 64 64 Address64Yes 
6565 Name65 Address 65 Name, 65 AddressNo1NoName, 65 65 Address65Yes 
6666 Name66 AddressPatricia & Malcolm66 Name, 66 AddressNo1YesName, 66 66 Address66Yes 
6767 Name67 AddressPatricia67 Name, 67 AddressNo1NoName, 67 67 Address67Yes 
6868 Name68 Address 68 Name, 68 AddressNo3No Name, 68 68 Address68Yes 
6969 Name69 AddressFelix & Jean69 Name, 69 AddressNo1YesJean has my numberName, 69 69 Address69Yes 
7070 Name70 AddressHugh & Denise70 Name, 70 AddressNo1YesBoth have my numberName, 70 70 Address70Yes 
Passengers
Cell Formulas
RangeFormula
A2:A70A2=ROW() &" Name"
B2:B70B2=ROW() & " Address"
I2:I70I2=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:J70J2=IF($A2="","",TRIM(B2))
K2:K70K2=LEFT(A2,FIND(" ",A2))
D60:D70,D26:D58,D2:D24D2=A2&","&CHAR(10)&B2
D25,D59D25=A25&","& CHAR(10)&B25
M2:M8M2=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L$2:$L$200="Yes",ROW($K$2:$K$200)),ROW(1:1))-1,1),"")
M9M9=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L$2:$L$200="Yes",ROW($K$2:$K$200)),ROW(8:8))-1,1),"")
M10:M70M10=IFERROR(INDEX($A$2:$A$200,SMALL(IF($L10:$L$200="Yes",ROW($K$2:$K$200)),ROW(9:9))-1,1),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
_FilterDatabase=Passengers!$A$1:$H$196M2:M8, I2
Cells with Data Validation
CellAllowCriteria
G1:G70ListYes,No
L1:L70ListYes,No
E1:E70ListNo,Yes


As table
 
Upvote 0
Just enter the formula into M2 using Ctrl Shift Enter, then drag down.


Me too. :(
That has cracked it. :)

Thank you @etaf for the solution and thank you @Fluff for the additional help.
I have now removed the status from the sort and sorted as before and the column works great.

I am now going to change the ranges to dynamic named ranges as this list will grow, but now when I change the validation to ActivePassengers I will get exactly what I was asking for. :)
Thank you both again. Great solution!
 
Upvote 0

Forum statistics

Threads
1,215,280
Messages
6,124,034
Members
449,139
Latest member
sramesh1024

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