Data Validation List based on another Data validation list which selects certain value

drewberts

Board Regular
Joined
Sep 5, 2013
Messages
177
Office Version
  1. 365
Platform
  1. Windows
I have 2 named ranges called EleType and EleNo. EleType contains N/A,Type A, Type B, Type C and EleNo contains N/A,1,2,3,4,5,6,7,8

I have 2 data validation cells set up (A1 uses EleType and A2 uses EleNo). What I'm trying to do is automatically set N/A in Cell A2 if N/A is selected in Cell A1. If anything other than N/A is selected in A1 then I want A2 to remain blank so that the use can select from the EleNo data validation list - but at the same time I want the data validation list in A2 to not include N/A if A1 doesn't have N/A selected.

I hope I've explained that in a way that makes sense...

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Whilst this doesn't automatically put N/A in A2, how about
+Fluff New.xlsm
ABCDE
1N/AN/A1
2N/Aa2
3b3
44
5
6
Main
Cells with Data Validation
CellAllowCriteria
A1List=EleType
A2List=IF(A1="N/A",C1,EleNo)
 
Upvote 0
If you're using o365 you can use the FILTER function and spilled range reference.

In C1 type =FILTER(EleNo,IF(A1="N/A",EleNo="N/A",EleNo<>"N/A"))
In A2 the data validation criteria will be =C1#
 
Upvote 0
Whilst this doesn't automatically put N/A in A2, how about
+Fluff New.xlsm
ABCDE
1N/AN/A1
2N/Aa2
3b3
44
5
6
Main
Cells with Data Validation
CellAllowCriteria
A1List=EleType
A2List=IF(A1="N/A",C1,EleNo)

Many thanks @Fluff. Whilst it doesn't quite deal with the auto N/A it does work for me
 
Upvote 0
If you're using o365 you can use the FILTER function and spilled range reference.

In C1 type =FILTER(EleNo,IF(A1="N/A",EleNo="N/A",EleNo<>"N/A"))
In A2 the data validation criteria will be =C1#

Many thanks. I've looked at this and I get a ~CALC error in my list and a #SPILL error in my cell
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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