Hello everyone,
I have a question.
I want to create a simple macro which continuously checks the data in cell A1.
Right now it doesn't work. I have to select "Run Macro" in the menu everytime I want my macro to check the data.
I know it's possible to automate this process and I suspect/hope it's very simple.
The code I'm using is as follows:
Sub test()
If [A1] = 1 Then
[B1] = "1"
ElseIf [A1] = 2 Then
[B1] = "2"
ElseIf [A1] = 3 Then
[B1] = "3"
ElseIf [A1] = 4 Then
[B1] = "4"
ElseIf [A1] > 4 Then
[B1] = "Wrong Entry"
ElseIf [A1] < 0 Then
[B1] = "Wrong Entry"
End If
End Sub
My experience with Visual Basic is no greater then the above lines of code so I'd apreciate it if you could keep it simple
Tim
Edit: I forgot to tell you, cell A1 is a pulldown list, created with the validation>list option.
I have a question.
I want to create a simple macro which continuously checks the data in cell A1.
Right now it doesn't work. I have to select "Run Macro" in the menu everytime I want my macro to check the data.
I know it's possible to automate this process and I suspect/hope it's very simple.
The code I'm using is as follows:
Sub test()
If [A1] = 1 Then
[B1] = "1"
ElseIf [A1] = 2 Then
[B1] = "2"
ElseIf [A1] = 3 Then
[B1] = "3"
ElseIf [A1] = 4 Then
[B1] = "4"
ElseIf [A1] > 4 Then
[B1] = "Wrong Entry"
ElseIf [A1] < 0 Then
[B1] = "Wrong Entry"
End If
End Sub
My experience with Visual Basic is no greater then the above lines of code so I'd apreciate it if you could keep it simple

Tim
Edit: I forgot to tell you, cell A1 is a pulldown list, created with the validation>list option.