moheganburner
Board Regular
- Joined
- Dec 2, 2005
- Messages
- 158
Hi guys. On "Sheet2", if a cell in Column F has the word "Ready" in it, I want to clear the contents of the corresponding cell in Column H. I'm picturing an if statement. I know this code doesn't do anything, but I didn't want to come to the board empty handed.
Code:
Sub ClearCell()
Dim Sheet2 As Long
Set Ws5 = Worksheets("Sheet2")
With Ws5
For x = 2 To Sheet2 'because I want to start searching in row 2
Set foundRng = searchRng.Find(Ws5.Cells(x, 8))
If foundRng Is Nothing Then
Ws5.Range("H65536").ClearContents
End If
Next x
End With
End Sub