Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 618
- Office Version
- 2019
- 2016
- Platform
- Windows
I have a table and I'd like to apply data validation to the entire table column based on the header (ID, BirthDate, Sex, Source, etc).
I have two questions:
1) I have code from another project that I use for any situation, but I'm curious if there's a more efficient coding that I could use specifically for a table
Universal code:
2) after applying the data validation, I'd like each new row to "inherit" the column data validation (critical):
A) without having to re-run the macro and
B) confine data validation to the table column only (not have entire column with data validation).
Thoughts anyone?
Thanks y'all.
As an aside, is there any way to create a list of data validation ranges/criteria? Kind of like what you can do with F3 | Paste List for named ranges/tables or what Jeff Weir did here (Easy way to back up CF formats)??
I have two questions:
1) I have code from another project that I use for any situation, but I'm curious if there's a more efficient coding that I could use specifically for a table
Universal code:
Code:
Case .value Like "*SEX*"
For Each cell In Intersect(hdrCell.EntireColumn, rngUsed).Offset(1, 0).Resize(rngUsed.Rows.Count - 1)
' ~~ apply data validation ~~
2) after applying the data validation, I'd like each new row to "inherit" the column data validation (critical):
A) without having to re-run the macro and
B) confine data validation to the table column only (not have entire column with data validation).
Thoughts anyone?
Thanks y'all.
As an aside, is there any way to create a list of data validation ranges/criteria? Kind of like what you can do with F3 | Paste List for named ranges/tables or what Jeff Weir did here (Easy way to back up CF formats)??