PC Review


Reply
Thread Tools Rate Thread

Copy/paste rows to new sheet based on cell value

 
 
Taylor
Guest
Posts: n/a
 
      9th Sep 2008
I have a large spreadsheet in which one column returns "check status",
"visit", or "Send Letter 2" based on an IF/THEN formula. Is there a way to
automatically select those rows containing "check status", "visit", and "Send
Letter 2", copy the row and paste it onto a new sheet? Do I need a macro for
this?
 
Reply With Quote
 
 
 
 
Dan R.
Guest
Posts: n/a
 
      9th Sep 2008
This assumes your values are in column A:

Sub CopyRows()
lrow = Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lrow
dest = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row
If Cells(i, 1).Value = "check status" Or _
Cells(i, 1).Value = "visit" Or _
Cells(i, 1).Value = "Send Letter 2" Then
Rows(i).Copy Sheets(2).Rows(dest + 1)
End If
Next i
End Sub

--
Dan


On Sep 9, 12:04*pm, Taylor <Tay...@discussions.microsoft.com> wrote:
> I have a large spreadsheet in which one column returns "check status",
> "visit", or "Send Letter 2" based on an IF/THEN formula. *Is there a way to
> automatically select those rows containing "check status", "visit", and "Send
> Letter 2", copy the row and paste it onto a new sheet? *Do I need a macro for
> this?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Microsoft Excel Misc 2 15th May 2010 06:49 AM
Copy and paste rows from one wksht to another based on cell value PVANS Microsoft Excel Programming 3 22nd Mar 2010 12:09 PM
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. bertbarndoor Microsoft Excel Programming 4 5th Oct 2007 04:00 PM
Re: Copy rows from one sheet to another based on a cell value =?Utf-8?B?TWF4?= Microsoft Excel New Users 0 21st Dec 2006 01:00 AM
copy and paste to another sheet based in cell color nat3ten Microsoft Excel Programming 7 8th Jul 2005 11:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:12 AM.