Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Macro to highlight a specified row

I wasn't sure what you meant by "highlight". Did you want to select it or
color it yellow? So I did both in the code below. Hope this helps! If so,
click "YES" below.

Sub HighlightRow()

Dim MyRow As Long

MyRow = Range("B:B").Find(What:="Gauranteed", _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False).Row

' select the row
Rows(MyRow).Select

' highlight row yellow
Rows(MyRow).Interior.Color = 65535

End Sub
--
Cheers,
Ryan


"Jodie" wrote:

How would I write a macro to find "Gauranteed" in any cell in Column "B" and
then highlight that row? Also, this would be for an entire workbook.
--
Thank you, Jodie

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
Macro - highlight rows Zen Excel Programming 4 July 3rd 07 10:50 AM
Macro to highlight rows and... Dave Birley Excel Programming 1 May 1st 07 01:38 PM
Macro to Highlight EJS[_2_] Excel Programming 5 May 30th 06 02:23 PM
Macro to Highlight Range LLoraine Excel Discussion (Misc queries) 2 April 19th 06 02:41 PM
Highlight Cell Macro palley Excel Programming 1 November 13th 03 06:30 AM


All times are GMT +1. The time now is 11:51 PM.

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"