Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I have a VBA which had changed slightly, but now I'm running into an issue where it will not add text to a cell if data already exists. The formula I'm using is:
The bottom portion beginning with "If ActiveSheet" worked properly if I used the syntax "CASE" in the first portion of the VBA, but now I am using a wildcard "*V" I am getting an error on the "End Select" Portion of the VBA. Any assistance would be wonderful.
VBA Code:
Sub Depositioner()
Dim i As Long
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Left(Cells(i, 1).Value, 2) Like "*V" Then
If ActiveSheet.Range("F" & i) = "" Then
ActiveSheet.Range("F" & i) = "DEPOSITIONER"
Else
ActiveSheet.Range("F" & i) = ActiveSheet.Range("F" & i) & "/DEPOSITIONER"
End If
End Select
Next i
End Sub
The bottom portion beginning with "If ActiveSheet" worked properly if I used the syntax "CASE" in the first portion of the VBA, but now I am using a wildcard "*V" I am getting an error on the "End Select" Portion of the VBA. Any assistance would be wonderful.