LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Conditional Data Bar Format by Row to entire sheet Moz Excel Discussion (Misc queries) 0 October 5th 09 04:24 PM
Copying conditional formatting to entire sheet slyguy2183 Excel Discussion (Misc queries) 3 June 10th 08 05:20 AM
Copying formatting of entire sheet Diamontina Cocktail New Users to Excel 5 June 27th 07 10:50 PM
How do I convert an entire sheet from columns to rows? dorthy Excel Worksheet Functions 1 November 12th 05 04:16 AM
Copying rows with spesified data on one or more columns from sheet/file to another? Zemalf Excel Programming 0 October 15th 04 07:55 AM


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"