Copy Entire Row
I need a line of code to copy an entire active row. I have a loop to find cells in A:A that meet a certain criteria. If that is met, I want to copy the entire active row to paste onto a different sheet. Thanks. -- scottnshelly ------------------------------------------------------------------------ scottnshelly's Profile: http://www.excelforum.com/member.php...fo&userid=7301 View this thread: http://www.excelforum.com/showthread...hreadid=551988 |
Copy Entire Row
ActiveCell.EntireRow.copy
-- Regards, Tom Ogilvy "scottnshelly" wrote: I need a line of code to copy an entire active row. I have a loop to find cells in A:A that meet a certain criteria. If that is met, I want to copy the entire active row to paste onto a different sheet. Thanks. -- scottnshelly ------------------------------------------------------------------------ scottnshelly's Profile: http://www.excelforum.com/member.php...fo&userid=7301 View this thread: http://www.excelforum.com/showthread...hreadid=551988 |
Copy Entire Row
Try using this, add a command button or autoshape button to run th code Regards, Simon Dim mycell Dim rng As Range t1 = InputBox("Enter the match you want", "What to look for?", "") Set rng = Range("A:A") For Each mycell In rng If mycell.Value = t1 Then mycell.Rows.Select Selection.Copy Sheets("Sheet2").Select Set rng = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp)(2) rng.Select ActiveSheet.Paste End If Next End Su -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=55198 |
Copy Entire Row
Thanks guys, Tom: I figured it'd be something simple like that. Thanks. Simon: Nothing happens after I push Enter on the input box. Thanks again -- scottnshell ----------------------------------------------------------------------- scottnshelly's Profile: http://www.excelforum.com/member.php...nfo&userid=730 View this thread: http://www.excelforum.com/showthread.php?threadid=55198 |
All times are GMT +1. The time now is 09:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com