View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ivanl Ivanl is offline
external usenet poster
 
Posts: 19
Default for...next including if function and or function

Hi, I do not knwo what is wrong with my code:

sub cleanisup()
Dim i As Long

For i = 1 To 700

If Range(Cells(i, 6)).Value = "long" Or "CR" Then ' if the value is not
long or CR then
ActiveCell.Rows("1:1").EntireRow.Select 'activate the whole row
Selection.Delete Shift:=xlUp ' delete this activated row


End If

Next i ' test next cell



End Sub