LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Toby0924
 
Posts: n/a
Default Highlight row given certain conditions

Hello!

I am attempting to make a macro that will select a range and look in column
B for an "X" If that condition is met, I would like it to highlight the
entire row, or if it would be easier, to highlight the row in columns A - M.
I have worked on the macro below and I can get the cells with "X" in the
column to hightlight, but I cannot get it to select the entire row.

If there is an easier way to accomplish this I would welcome the
suggestion...this is what I'm currently using.

Rows("4:4").Select
Range(Selection, Selection.End(xlDown)).Select
Dim Cell As Range

For Each Cell In Selection
If Cell.Value = "x" Then
Cell.Interior.Color = vbGreen
Else
End If
Next Cell
End Sub

Thanks in advance for you help!
 
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
Want to highlight all but first line Laurel New Users to Excel 1 March 6th 05 10:41 PM
Want to highlight all but first line Laurel New Users to Excel 0 March 6th 05 10:30 PM
How do I count number of cels the matches 2 conditions ? Abra Excel Worksheet Functions 2 February 27th 05 08:56 PM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM
average on 2 conditions Ted Metro Excel Worksheet Functions 6 January 7th 05 08:23 PM


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