contents of dropdownlist dependant on cell value

WilJan

New Member
Joined
Sep 28, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi all,

I'm struggling with this issue and I hope you can help me out:
  • In a table on sheet 1, I want to show a dropdown list in cell H3 using datavalidation. The contents of the list should be dependent on the value in cell G3. If G3 contains the abbreviation “KS” the contents of the list should be based on the named range “KS”, which refers to the range =OFFSET(Sheet2!$I$2;1;0;COUNTA(Sheet2!$I:$I)-1;1). If G3 contains “OT” it should load that named range into the list, etc. I referred to these named ranges elsewhere and they seem to work.
  • To make the dropdown dependent on the value in G3 I inserted the formula =Indirect(G3) as the source for the list in the datavalidation screen
  • This results in a blanc list, though
thank you so much!

Wilco
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Does the cell G3 contain any leading spaces or anything that would make it different from the named ranges.

Have you tried:
Excel Formula:
=INDIRECT(TRIM(G3))
 
Upvote 0
Does the cell G3 contain any leading spaces or anything that would make it different from the named ranges.

Have you tried:
Excel Formula:
=INDIRECT(TRIM(G3))
not yet, thank you, but that doesn't seem to solve the problem i'm afraid
 
Upvote 0
Does the cell G3 contain any other characters other than: KS or OT?
 
Upvote 0
Does the cell G3 contain any other characters other than: KS or OT?
no, none, just the abbreviations. I've tried a few things in the meantime and apperently there's something wrong with the named range after all, if i remove the offset-part and just enter I3:I5 it works correctly (but it needs to be dynamic to allow for new entries)
 
Upvote 0
You could create tables for your dropdowns and name the table after: KS & OT etc...
Then you could still use: =INDIRECT(A3) for example, that way the tables will extend when you add new values.

Tables on the right are named: KS, OT & BP

Book1
ABCDEFGH
1AbbrvDDownKSOTBP
2KS141
3OT252
4KS363
5OT7
6BP
7
Sheet1
Cells with Data Validation
CellAllowCriteria
B2:B6List=INDIRECT(A2)
 
Upvote 0
no, none, just the abbreviations. I've tried a few things in the meantime and apperently there's something wrong with the named range after all, if i remove the offset-part and just enter I3:I5 it works correctly (but it needs to be dynamic to allow for new entries)
Indirect can't use a 'dynamic' named range.
See if this helps:
range-name-using-offset-formula-vs-data-validation
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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