Data validationin logical function
Closed
vachee1
Posts
1
Registration date
Tuesday September 27, 2011
Status
Member
Last seen
September 27, 2011
-
Sep 27, 2011 at 03:54 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 27, 2011 at 09:46 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 27, 2011 at 09:46 PM
Related:
- When you wrote incorrect functions, what did you learn about spreadsheet data?
- Functions of spreadsheet - Guide
- Tmobile data check - Guide
- Google spreadsheet right to left - Guide
- How to reset safe folder password without losing data ✓ - Android Forum
- We limit how often you can post, comment or do other things in a given amount of time in order to help protect the community from spam. you can try again later. learn more ✓ - Facebook Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 27, 2011 at 09:46 PM
Sep 27, 2011 at 09:46 PM
try this macro
Sub test()
Dim re As Range, rf As Range
Set re = Range("E1:E5")
Set rf = Range("F1:F5")
If Range("C1") = Range("B1") Then
With Range("D1").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$E$1:$E$5"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Else
With Range("D1").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$F$1:$F$5"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
End Sub