This is what I have received from the other board
Option Explicit
Sub No_RFE()
Dim c As Range
Dim lRow As Long
Dim NewWB As Workbook
Dim iCol As Integer
Application. ScreenUpdating = False
Set NewWB = Workbooks.Add
'copy header and formats
For iCol = 1 To 18
NewWB. Sheets("Sheet1").Cells(1, iCol).ColumnWidth = Me.Cells(1, iCol + 2).ColumnWidth
Next iCol
Me.Activate
Range(Cells(1, 3), Cells(1, 21)).Copy
NewWB.Activate
ActiveSheet.Paste Destination:=Worksheets("Sheet1").Cells(1, 1)
Range(Cells(1, 1), Cells(1, 18)).WrapText = True
'copy records with "No Ref" in column N
Me.Activate
lRow = 1
For Each c In Range("N1", Range("N65536").End(xlUp))
If c.Value = "No RFE" Then
Range(Cells(c.Row, 3), Cells(c.Row, 21)).Copy
NewWB.Activate
lRow = lRow + 1
ActiveSheet.Paste Destination:=Worksheets("Sheet1").Cells(lRow, 1)
Range(Cells(lRow, 1), Cells(lRow, 18)).WrapText = True
Me.Activate
End If
Next c
Application.CutCopyMode = False
End Sub
Still working on saving file and renaming, as well as sorting the new file by dates.
Jimbean
Bookmarks