Hi everyone,
I was hoping someone could look at my code below and tell me how to leave cell(-1,1) unchanged if the three cases are not met. Right now the cell is turned to blank if the case is not met. Also, how can I change the activation of the procedure to clicking on cell C15 specifically instead of just any selection change? Would this be easier with an IF THEN?
Thanks for any help!!
Bryan
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range, answer As String
Set rng = Range([C15], [C15])
For Each cell In rng
Select Case cell
Case Is = "Fixed 30 Year": answer = "Not Applicable"
Case Is = "Fixed 20 Year": answer = "Not Applicable"
Case Is = "Fixed 15 Year": answer = "Not Applicable"
End Select
cell(-1, 1) = answer
n:
Next
End Sub
I was hoping someone could look at my code below and tell me how to leave cell(-1,1) unchanged if the three cases are not met. Right now the cell is turned to blank if the case is not met. Also, how can I change the activation of the procedure to clicking on cell C15 specifically instead of just any selection change? Would this be easier with an IF THEN?
Thanks for any help!!
Bryan
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range, answer As String
Set rng = Range([C15], [C15])
For Each cell In rng
Select Case cell
Case Is = "Fixed 30 Year": answer = "Not Applicable"
Case Is = "Fixed 20 Year": answer = "Not Applicable"
Case Is = "Fixed 15 Year": answer = "Not Applicable"
End Select
cell(-1, 1) = answer
n:
Next
End Sub