![]() |
Copying the entire sheet if columns H & G are equal to row.
Hi, I wanted to know. If i have a worksheet, I want to create a code that will copy rows i their Column H & G are both equal to "0" to another worksheet whic will be called missing I started to but I am having problems with naming the selection. Sub paste() Range("A12:M12").Select ' select Header row Selection.AutoFilter 'copy all where column H and G is zero Selection.Columns ("H:G"), Criteria1:="0", Operator:=xlAnd Rows("13:2000").Select Selection.Copy Shift:=xlUp 'Reset filter Selection.Columns ("H:G") 'Paste to new sheet "missing " Sheets("missing").Select Range("A3").Select Selection.PasteSpecial paste:=xlPasteColumnWidths Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False ActiveSheet.paste End Sub PLEASE HELP---- Email hanks so much for your hel -- ICSAnalys ----------------------------------------------------------------------- ICSAnalyst's Profile: http://www.excelforum.com/member.php...fo&userid=1509 View this thread: http://www.excelforum.com/showthread.php?threadid=27789 |
All times are GMT +1. The time now is 12:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com