LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Find a certain word in excel and select the cell

From VBA Help:

Find Method Example

This example finds all cells in the range A1:A500 on worksheet one that
contain the value 2, and then it makes those cells gray.

With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Interior.Pattern = xlPatternGray50
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With

Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
select row if find word CC Excel Discussion (Misc queries) 1 October 15th 09 05:15 PM
select date range then find average of values in another cell rob117 Excel Worksheet Functions 3 May 3rd 07 03:34 PM
Use find to select entire rows with a cell with that value Franky88 Excel Worksheet Functions 2 March 30th 07 06:38 PM
How do I select the last alphanumric word in an excel column with. Puzzled Excel User Excel Worksheet Functions 2 October 26th 06 11:34 PM
In Excel, how do I find one word in a set of text in a cell? man818 Excel Discussion (Misc queries) 4 May 20th 06 02:20 PM


All times are GMT +1. The time now is 09:56 AM.

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

About Us

"It's about Microsoft Excel"