AustinRoberts32
New Member
- Joined
- Oct 15, 2018
- Messages
- 3
First off, I just started to really learn vba, so I'm clueless to some of this stuff but I do know how to research and learn.
Now, I have a worksheet that I to automatically input data into cells when specific columns are changed.
I've been working and searching for hours and I have had no luck in finding anything on the internet for help. Basically when
someone enters data into any cell in column B the corresponding cell in column should have data entered depending on what was
entered in column B. If "Yes" is entered in column B, then "Already Finished" should be entered into Column I.
The following is the criteria for procedureIf Cell B2 = "Yes" Then Insert "Already Finished" in Cell I2
______________________________If "No" Then "Incomplete"
________________________________
If "ORDERED" Then "Follow Up"
________________________________
If "NSTK" Then "NSTK"
________________________________
If "OBSL" Then "OBSELETE"
________________________________Here's the code I have for it so far.
Now, I have a worksheet that I to automatically input data into cells when specific columns are changed.
I've been working and searching for hours and I have had no luck in finding anything on the internet for help. Basically when
someone enters data into any cell in column B the corresponding cell in column should have data entered depending on what was
entered in column B. If "Yes" is entered in column B, then "Already Finished" should be entered into Column I.
The following is the criteria for procedureIf Cell B2 = "Yes" Then Insert "Already Finished" in Cell I2
______________________________If "No" Then "Incomplete"
________________________________
If "ORDERED" Then "Follow Up"
________________________________
If "NSTK" Then "NSTK"
________________________________
If "OBSL" Then "OBSELETE"
________________________________Here's the code I have for it so far.
Code:
Public Sub ChangeTest()
Dim LastRow As Long
Dim i As Long
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
Select Case LCase(Range("B" & i))
Case "no"
Range("I" & i) = "Incomplete"
Case "yes"
Range("I" & i) = "Already Finished"
Case "nstk"
Range("I" & i) = "NSTK"
Case "obsl"
Range("I" & i) = "OBSLETE"
Case "ordered"
Range("I" & i) = "Follow Up"
End Select
Next i
End Sub