RagingBokky
New Member
- Joined
- May 27, 2017
- Messages
- 12
Hello All,
My current problem is
I want to be able to type in a certain value such as test and when I press enter to finalize the value I want it to change a value of another cell or more
I have the following private sub
however when I type in test in the E column the expected outcome of changing column M to Desktop Survey doesn't happen
but...when I change it to a data validation type thing with a drop down menu works perfectly...but its not how I want it to function
I have tried as well
I type in test this time however it does nothing when I press enter in column E but does finally change the value if I deselect and then select the cell
It is not how I ideally want it to function
I really prefer to type in the Value itself and upon pressing enter to finalize the cell value due to the value equal change the value of another cell
I am wondering if I am using the function wrong at all so I am not entirely sure
My current problem is
I want to be able to type in a certain value such as test and when I press enter to finalize the value I want it to change a value of another cell or more
I have the following private sub
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Cells(Selection.Row, 13)) Is Nothing Then
Select Case Cells(Selection.Row, 13)
Case "NA": Cells(Selection.Row, 8) = "NWR"
Cells(Selection.Row, 9) = "NWR"
Cells(Selection.Row, 10) = "NWR"
Case "Desktop Survey": Cells(Selection.Row, 8) = "Desktop Survey"
Cells(Selection.Row, 9) = "NWR"
Cells(Selection.Row, 10) = "NWR"
End Select
ElseIf Not Intersect(Target, Cells(Selection.Row, 5)) Is Nothing Then
Select Case Cells(Selection.Row, 5).Value
Case "test": Cells(Selection.Row, 13) = "Desktop Survey"
End Select
End If
End Sub
however when I type in test in the E column the expected outcome of changing column M to Desktop Survey doesn't happen
but...when I change it to a data validation type thing with a drop down menu works perfectly...but its not how I want it to function
I have tried as well
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Cells(Selection.Row, 5) = "test" Then
Cells(Selection.Row, 13) = "Desktop Survey"
End If
'End Sub
I type in test this time however it does nothing when I press enter in column E but does finally change the value if I deselect and then select the cell
It is not how I ideally want it to function
I really prefer to type in the Value itself and upon pressing enter to finalize the cell value due to the value equal change the value of another cell
I am wondering if I am using the function wrong at all so I am not entirely sure