VIorica000
New Member
- Joined
- May 2, 2023
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hello everyone,
I have the following situation:
I have to add a data validation from a range but applying a filter
My Data Validation must be composed from the following list (Activity) only when the column TYPE = 1
how to apply a filter in the VBA for a data validation?
I have the following situation:
I have to add a data validation from a range but applying a filter
My Data Validation must be composed from the following list (Activity) only when the column TYPE = 1
how to apply a filter in the VBA for a data validation?
VBA Code:
Sub PopulateFromANamedRange() Range("A18").Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _ Formula1:="=Activity" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "Error" .InputMessage = "" .ErrorMessage = "Please Provide a Valid Input" .ShowInput = True .ShowError = True End Sub