Dynamic Data Validation

TheRogue!

Board Regular
Joined
Mar 2, 2012
Messages
84
Office Version
  1. 2021
Platform
  1. Windows
I have a table for warehouse evaluation where the combination of the Section/Row/bay dictates the number of levels (high) the location is. This can vary, as some locations are higher than others. I want to use Data Validation on Column H to limit the options to the maximum as dictated by [@LEVELS]. So, theoretically, the range for the data validation could be different for each row. I thought that I could do it w/ the use of an INDIRECT statement, but the Data Validation doesn't seem to like that.
 

Attachments

  • Project1.jpg
    Project1.jpg
    127.3 KB · Views: 14

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I'm really hoping you have Office 365. Maybe you should edit your profile.

Here is my first solution to having dynamic Data Validation per row. You would have a supporting formula next to your table or in it and hide the columns. I put the supporting formula in column H. The data validation formula uses =H2# where # is represented to see the SPILL values. The formal transposes the results across rows, so your formula will need to be the right most column in the table. If its an Excel Table, you'll need to allocate enough columns to account for all the levels you have in the list.

Book2
ABCDEFGHIJKLM
1SectionRowBay# of LevelsFrame SizeLevel of Damaged FrameLevel Data Validation Formulas
2Section EROW 0 - EvenBay 15Level 1Level 2Level 3Level 4Level 5
36Level 1Level 2Level 3Level 4Level 5Level 6
Sheet1
Cell Formulas
RangeFormula
H2:L2,H3:M3H2=TRANSPOSE(FILTER(LevelList,LevelChoices<=D2))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
LevelChoices=Sheet2!$B$2:$B$19H2:H3
LevelList=Sheet2!$C$2:$C$19H2:H3
Cells with Data Validation
CellAllowCriteria
F2:F3List=H2#


Book2
BC
1LevelChoicesLevelList
21Level 1
32Level 2
43Level 3
54Level 4
65Level 5
76Level 6
87Level 7
98Level 8
109Level 9
1110Level 10
1211Level 11
1312Level 12
1413Level 13
1514Level 14
1615Level 15
1716Level 16
1817Level 17
1918Level 18
Sheet2


1687977426899.png
 
  • Like
Reactions: Biz
Upvote 0
It looks like SPILL formulas can't be used in a defined table

You could keep the Formula I put in Cell H3 outside the defined table and it works fine
 
Upvote 0
It looks like SPILL formulas can't be used in a defined table

You could keep the Formula I put in Cell H3 outside the defined table and it works fine
Thank you for this. I am unfamiliar w/ the # operator. Is that new for 365? (I'll go research it).
 
Upvote 0
I'm not sure how long that's been around, maybe Office 16.

Using the pound (#) on a cell with a spill formula will get all the results from the rows or columns that it spills into. This is a dynamic reference
 
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,966
Members
449,137
Latest member
yeti1016

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