Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Good evening, I start out with a formula then determined it would not be efficient since I did not want the end values in my "Result" Column.
This VBA is set directly into Sheet 1, we need it to update automatically.
The following code I think is getting me in the right direction. I do see ////KG being placed in the first one; however, my Excel then quickly shuts done. I also need to add one line that the only time this macro works is when it meets the "TE*" requirement. I think I'll need an else option.
I added the Excel to the Dropbox: Worksheet VBA DROPBOX.xlsm
My code now is
Thank you very much indeed.
This VBA is set directly into Sheet 1, we need it to update automatically.
The following code I think is getting me in the right direction. I do see ////KG being placed in the first one; however, my Excel then quickly shuts done. I also need to add one line that the only time this macro works is when it meets the "TE*" requirement. I think I'll need an else option.
I added the Excel to the Dropbox: Worksheet VBA DROPBOX.xlsm
My code now is
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Dim result As String
For Each rng In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
Select Case rng.Value
Case rng.Value Like "TE*"
result = "///KG"
End Select
rng.Offset(0, 2).Value = result
Next
End Sub
Thank you very much indeed.