hello, try running this
Sub VBA()
'D_Rennie 16/1/2010
Dim LR As Long
With Application
.ScreenUpdating = False
.DisplayAlerts = False
.Goto ThisWorkbook.Sheets(1).Cells(1, 1)
With ThisWorkbook
With Sheets(1)
LR = .Range("A" & .Rows.Count).End(xlUp).Row
End With
Sheets.Add(After:=Sheets(Sheets.Count)).Name = "TestVBA"
With .Sheets("TestVBA")
.Range(.Cells(2, 1), .Cells(LR, 1)).FormulaR1C1 = _
"=IF(Sheet1!RC="""","""",IF(OR(Sheet1!RC[1]=1,Sheet1!RC[2]=1),Sheet1!RC,""""))"
.Columns(1).SpecialCells(xlCellTypeFormulas, 1).EntireRow.Copy ThisWorkbook.Sheets(2).Range("A1")
.Columns(1).ClearContents
End With
.Sheets("TestVBA").Delete
End With
.DisplayAlerts = True
.ScreenUpdating = True
End With
cheers