Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Copy Entire Row From One Worksheet to Another

Status
Not open for further replies.

JayMan25

Technical User
May 30, 2006
6
US
Hey Guys or Ladies,

I can't figure out how to copy an entire row based on the data from one column. For example if I start at column G5 from worksheet named(old data) if the column has "Yes" in it then I want to copy all the data in that is in row 5 to another worksheet named(new data) and put it in a the first empty row. then read the next row in column G. Sorry might be confusing.
 
Autofilter on YES for that column. Go to Edit > Go To > Special > Visible Cells Only. Now copy 'n' Paste to another sheet.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Sorry I wasn't clear about this I want To Use a Macro to do all of this.
 
Turn on your macro recorder (Tools > Macros > Record New Macro), go through the steps outlined above. Observe the code that was generated ([Alt]+[F11] opens the VBEditor).

Post back with any specific questions.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
I understand that part but it I still cant figure out how to copy and paste only the rows with "Yes" in them in column G

example

A B C D E F G H
1 dog cat bird mouse good hungry yes sick
2 cat dog good mouse good hungry no sick
3 cat dog good mouse good hungry no sick
4 dog cat bird mouse good hungry yes sick
5 cat dog good mouse good hungry no sick
6 dog cat bird mouse good hungry yes sick
7 dog cat bird mouse good hungry yes sick
 
Put my previous two posts together.

1) Turn on your macro recorder (Tools > Macros > Record New Macro), go through the steps outlined above. Observe the code that was generated ([Alt]+[F11] opens the VBEditor).

2)Autofilter on YES for that column. Go to Edit > Go To > Special > Visible Cells Only. Now copy 'n' Paste to another sheet.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
And, if you still need help, post your recorded code here as well.

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top