LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Macro: search word, select row, copy.


I'm tryingo to write a macro in excel which:

-Finds a word in the file
-Selects the row which contains the word
-Changes the color of the row
-Copy the entire row

I have this:

Cells.FindNext(After:=ActiveCell).Activate
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Selection.Copy
End Sub


but i can't seem to figure out how to select only the row which contains the
word. If I select the entire row, the macro will always copy that same row ['
Rows(4)' will select always row 4. 'Rows' will select all the rows...]

Comments?

 
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
Search Excel and copy result into word [email protected] Excel Programming 1 January 17th 07 02:08 PM
macro to intsert a word using the "Find" command to search for a word Stuart[_3_] Excel Programming 1 November 29th 06 05:13 AM
macro to search for & select ranges to sum Jason Head Excel Programming 1 June 14th 06 02:28 AM
search for a specific word and copy the word and the preceeding words until a comma DHANANJAY Excel Programming 12 December 31st 05 12:53 PM
select all & copy in word from macro in excel fitful_thought Excel Programming 3 June 19th 04 09:27 AM


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