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 and paste row based on cell content

I'm having trouble writing a macro that will copy a row of a table and paste
it into another sheet based on if the contents of a single cell in the row
contain a certain word.
Thanks,
BDan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Copy and paste row based on cell content

Sub CopyRow()
Dim SingleCell as Range
Set SingleCell = Range("A1")
If InStr(1,SingleCell.Value,"certain word") 0 Then
SingleCell.EntireRow.Copy
Sheets(2).Activate
Cells(1,1).PasteSpecial xlPasteAll
End Sub

HTH

Die_Another_Day

BDan wrote:
I'm having trouble writing a macro that will copy a row of a table and paste
it into another sheet based on if the contents of a single cell in the row
contain a certain word.
Thanks,
BDan


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
Copy row based on cell content billinr New Users to Excel 6 February 21st 07 01:49 PM
based on Cell/Column content ,cut one sheet's values and paste it in other sheet? mindpeace[_3_] Excel Programming 0 May 25th 06 01:33 PM
based on Cell/Column content ,cut one sheet's values and paste it in other sheet? mindpeace Excel Programming 3 May 24th 06 03:33 PM
How do I copy a formula/paste w/o losing the cell content? CShannon Excel Discussion (Misc queries) 6 June 25th 05 12:39 PM
Copy/Paste based on cell content. Hugh Askew Excel Programming 2 April 25th 04 01:06 PM


All times are GMT +1. The time now is 09:36 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"