Data validation dependent list for year and quarter

harinsh

Active Member
Joined
Feb 7, 2012
Messages
273
HI Team,

I need some help in data validation. I have years in column "A" like 2010,2011,2012,2013 so on ...and in column "B" I have quarters like Q1,Q2,Q3 so on....so, each year against quarters will be listed and not necessary every time 4 quarters some year should have 1 or 2 quarters as well.

I need to create data validation where if I select 2010 then only quarters should available to select in second validation. Hence, I need two validation ..one for year and another for quarter depend on year.

Can anyone help on this..thank you,
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Here is one way

Create a named range for each year and use INDIRECT function in the data validation list formula in A2
- name of range cannot be a number, so I decided to prefix each year with underscore character "_"

Excel 2016 (Windows) 32 bit
A
B
1
_2021Q2
2
data Validation
Allow: List
Source:
=Years
data Validation
Allow: List
Source:
=INDIRECT(A1)
Sheet: Sheet1

Excel 2016 (Windows) 32 bit
A
B
C
D
E
F
G
H
I
J
1
_2015_2016_2017_2018_2019_2020_2021_2022Years
2
Q1Q1Q2Q3Q1Q1Q1Q1_2015
3
Q2Q2Q4Q4Q2Q2Q2Q2_2016
4
Q3Q3Q3Q3Q3_2017
5
Q4Q4Q4Q4Q4_2018
6
_2019
7
_2020
8
_2021
9
_2022
Sheet: Names

Create named ranges quickly
Select A1:H5
Formulas tab\ Create Names From Selection \ from Top Row
Which automatically creates 8 named ranges _2015 _2016 _2017 _2018 _2019 _2020 _2021 _2022

Create named range Years containing those values (column J)

on other sheet

A1
data Validation
Allow: List
Source: =Years

A2
data Validation
Allow: List
Source: =INDIRECT(A1)
 
Upvote 0
If you want to avoid prefix in A1 use an intermediate cell (which could be hidden from user view)

Excel 2016 (Windows) 32 bit
A
B
C
D
1
2016​
Q3_2016
2
data Validation
Allow: List
Source: =INDIRECT(D1)
Formula in D1="_"&A1
Sheet: Sheet1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

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