Drop down list with conditions

baidya91

Board Regular
Joined
Jun 1, 2016
Messages
147
How to create a drop down list with conditions as follows:

IF B1= 1981,
C1 =
800-15-920-18-1118-21-1265
660-40-1100-50-1600
550-25-625-30-745-35-780-40-1220-50-1470
500-20-540-25-640-30-820-40-920
440-20-560-25-785-30-875-35-1050-40-1170
300-10-400-15-565-20-685
2600-55-2985-80-3525-65-4175

IF B1 = 1990

C1 =
4500-150-5250-175-7000-200-8800-225-9700
2200-80-3000-100-4000
1780-65-2040-80-3080-100-3780
1640-65-2095-80-3135-100-3635
1420-45-1555-55-1720-65-2305-75-3130
1040-25-1215-30-1485-35-1590-40-1670-50-1920
3600-100-4200-125-5700-150-7050
3350-90-3800-100-4700-125-6325
2600-55-2985-60-3525-65-4175
2700-60-3120-65-3770-70-4400
IF B1 = 1998
C1 =
8000-275-13500
6000-225-7800-250-9800-275-12000
5500-200-6300-225-8325-250-11325
4800-175-5850-200-6650-225-8675-250-10925
4650-150-5100-175-6325-200-7925-225-10175
4500-150-5250-175-7000-200-8800-225-9700
IF B1 = 2009
C1 -
PB4-BP-9000-40500-GP-RS-5400-AGP-RS-200
PB4-BP-9000-40500-GP-RS-4800-AGP-RS-200
PB4-BP-9000-40500-GP-RS-4800
PB4-BP-9000-40500-GP-RS-4700
PB4-BP-9000-40500-GP-RS-4400
PB4-BP-9000-40500-GP-RS-4100
PB4-BP-9000-40500-GP-RS-3900
PB2-BP-5400-25200-GP-RS-2600
PB2-BP-5400-25200-GP-RS-2900
PB1-BP-4900-16200-GP-RS-1700
PB1-BP-4900-16200-GP-RS-1800

FOR EXAMPLE, IF B1 = FRUIT,
C1 =
APPLE
ORANGE
GUAVA
MANGO........

<colgroup><col></colgroup><tbody>
</tbody>

<colgroup><col></colgroup><tbody>
</tbody>

<colgroup><col></colgroup><tbody>
</tbody>

<colgroup><col></colgroup><tbody>
</tbody>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Easiest way is with named ranges. Create a sheet named "Lists". Put your first list in column A. Then select the range and create a named range called "List1981". You can either just enter the name in the address box to the left of the formula bar, or go to the Formulas tab and click Define Name. Repeat for the other ranges. Now go back to your main sheet, select C1, from the Data tab select Data Validation > List > and for the formula enter:

=INDIRECT("List"&B1)


If your lists might change, it's possible to make the named ranges dynamic, so if you add an entry to the end, it will show up in the drop-down.
 
Last edited:
Upvote 0
Easiest way is with named ranges. Create a sheet named "Lists". Put your first list in column A. Then select the range and create a named range called "List1981". You can either just enter the name in the address box to the left of the formula bar, or go to the Formulas tab and click Define Name. Repeat for the other ranges. Now go back to your main sheet, select C1, from the Data tab select Data Validation > List > and for the formula enter:

=INDIRECT("List"&B1)


If your lists might change, it's possible to make the named ranges dynamic, so if you add an entry to the end, it will show up in the drop-down.

Thanks a lot...
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

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