Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I successfully am able to use the VBA below to insert text in Column D based on date in Column B. I want to have it be added if there is text already in Column D, naturally with a space. I don't want the inserted text to overwrite what is already in the cell. Thank you,
VBA Code:
Sub COVID()
Dim lr As Long
Dim i As Long
Dim wsAct As Worksheet
Set wsAct = ActiveSheet
Application.ScreenUpdating = False
With Sheets("Outbound FIDS")
.Activate
lr = Range("C" & Rows.Count).End(xlUp).Row
For i = 1 To lr
If Range("D" & i).Value = "" And Range("B" & i).Value <> "" Then
Range("D" & i).Value = "REFER TO DEPARTMENT OF STATE TRAVEL MANUAL"
End If
Next i
End With
wsAct.Activate
Application.ScreenUpdating = True
End Sub