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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
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
to Copy the Entire Row Steved Excel Programming 3 May 24th 06 09:55 PM
Copy entire row if.... Biff Excel Programming 9 November 23rd 05 09:21 PM
Copy entire row if... Sam Excel Programming 7 November 25th 04 06:16 PM
how to copy entire row into next row john_liu Excel Programming 2 September 22nd 04 02:17 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM


All times are GMT +1. The time now is 02:25 PM.

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

About Us

"It's about Microsoft Excel"