StefanRSA
New Member
- Joined
- May 26, 2008
- Messages
- 24
Hi Guys,
Must be getting annoyed with all my N00b questions...
Im trying to use a bit of code to clear a set range of cells. However, Im not sure of how the syntax should be. I have removed where the row references were and replaced them with a variable - y.
I have tried the following but no success:
For y = 10 To 209
If Cells(y, 2) = Employee Then
Range("B:AG").ClearContents
Exit For
End If
Next
Any ideas on the syntax?
Many thanks in advance for your consideration.
Must be getting annoyed with all my N00b questions...
Im trying to use a bit of code to clear a set range of cells. However, Im not sure of how the syntax should be. I have removed where the row references were and replaced them with a variable - y.
I have tried the following but no success:
For y = 10 To 209
If Cells(y, 2) = Employee Then
Range("B:AG").ClearContents
Exit For
End If
Next
Any ideas on the syntax?
Many thanks in advance for your consideration.