This has been solved, Thank you to whoever took the time to help me with this.
Clear Contens in a Column except for
Dorian Grey
1
Reputation point
Greetings, I am trying to insert text (Column E) in a cell if there is a number in another cell Column D. The problem is even for the blank cells "TBD" is being inserted in Column D. Now I'm trying to clear the contents of Column D, so excel doesn't think there is data there. This code will need to ignore the word "ROLL CALL" and any four digit number "####". Column D is in a Text format.
I did try this code, but got nowhere fast. Any suggestions would be great.
Sub DoNotContainrollcall()
Dim rng As Range
Dim cell As Range
Dim ContainWord As String
With Sheets("72 HR")
With .Range("D2", .Range("D" & Rows.Count).End(xlUp))
ContainWord = "ROLL CALL". "####"
For Each cell In rng.Cells
If cell.Find(ContainWord) Is Nothing Then cell.Clear
Next cell
End With
End With
End Sub