Thread: Loop and delete
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] staeri@gmail.com is offline
external usenet poster
 
Posts: 35
Default Loop and delete

I have the following code to loop through the cells in AZ:

Dim myRange As Range
Dim myCell As Range

With ActiveSheet
Set myRange = Range("AZ14:AZ33")
End With

For Each myCell In myRange.Cells
If myCell.Value = lstObj.Text Then
myCell.Value = ""

'Here I want to delete the values in cell J to BB!!!
End If
Next myCell

Now it deletes the values in myCell but I want to change this to delete
the values in the cells J to BB. How can this be done?

I'm very grateful for fast response.

Regards,

S