sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,380
- Office Version
-
- 2016
- Platform
-
- Windows
I'm using this to try to update cells automatically but it is not doing what I need;
The cell in E7 has Data Validation List and what I need is it to allow any value from that list if D7 is empty, (D7 contains a formula which does give "" if the source cell is empty). What is happening is that E7 is defaulting to 'Current'.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("D7").Value = "" Then
Select Case Range("D7").Value
Case Is > 8
Range("E7").Value = "Current"
End Select
Else
Select Case Range("D7").Value
Case Is < 1
Range("E7").Value = "Expired"
Case 1 To 8
Range("E7").Value = "Due to Expire"
End Select
End If
End Sub
The cell in E7 has Data Validation List and what I need is it to allow any value from that list if D7 is empty, (D7 contains a formula which does give "" if the source cell is empty). What is happening is that E7 is defaulting to 'Current'.