How to copy rows to a new worksheet if column F is not blank

eileendenver

New Member
Joined
Dec 14, 2005
Messages
5
I would like to copy rows to a new worksheet if column F (date of completion) is not blank. I would also like to copy over the headings if possible.

I will greatly appreciate your help since I have very limited VBA experience.
Thank you, in advance.
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Hi

Try
Code:
Sub ddd()
Range("a1").AutoFilter field:=6, Criteria1:="<>"
Range("a1").CurrentRegion.Copy Destination:=Sheets("sheet2").Range("a1")
Range("a1").AutoFilter
End Sub

Assumes that you are in sheet1 and the data to sort starts in A1 with headings in row 1. It doesn't clear out any existing data in the output sheet.


Tony


Tony
 

Watch MrExcel Video

Forum statistics

Threads
1,118,020
Messages
5,569,678
Members
412,287
Latest member
Ardamit
Top