View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Samuel Samuel is offline
external usenet poster
 
Posts: 26
Default delete part of a row based on certain criteria

Hi Mark,

please try this and see if this works

Sub PartDelete()
Range("G1").Select
For I = 1 To 2000
If ActiveCell.Value = "x" Then
ActiveCell.Offset(0, -6).Select
Range(Selection, Selection.End(xlToRight)).Clear
ActiveCell.Offset(0, 6).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Next I
End Sub
Try out this.