Thebatfink
Active Member
- Joined
- Apr 8, 2007
- Messages
- 410
Morning,
I have a worksheet change event, and its monitoring a range of cells, then cycling through each cell.. My range is S6:S63 but sometimes data is pasted to the workbook for instance R4:T8 which obviously straddles S6:S63 and triggers the code. I've got it cycling, but how do I tell it if the cell address is not within S6:S63 then to move onto the next cell? At the moment my If Not Intersect is processing all the cells in R4:T8, not just the cells in column S.
Does that make sense?
Thanks
Batfink!
I have a worksheet change event, and its monitoring a range of cells, then cycling through each cell.. My range is S6:S63 but sometimes data is pasted to the workbook for instance R4:T8 which obviously straddles S6:S63 and triggers the code. I've got it cycling, but how do I tell it if the cell address is not within S6:S63 then to move onto the next cell? At the moment my If Not Intersect is processing all the cells in R4:T8, not just the cells in column S.
Does that make sense?
Code:
If Not Intersect(Target, Range("S6:S63")) Is Nothing Then
For Each c In Target
If c <> "" Then
'Do my tasks on cell contents
End If
Next c
End If
Thanks
Batfink!