Highlight Entire Row if Cell value in Column is Met

pattafurr

New Member
Joined
Nov 9, 2007
Messages
10
I am trying to Highlight an entire row, if a vlue exists within a column. I have read many forums in which you can create a macro to do this. I have "10" values that I would like to use as far as values within a column. I would like to run the macro, and if a number exists, I would like it to highlight the entire row.
The cells that i would like to have read are within Columns "w" and "x". The cell values are within a merged cell because of the way that the program exports the report into excel.

The values that I would like to have met are :

96- Highlight Entire Row Orange
237-Highlight Entire Row Yellow
402-Highlight Entire Row Blue
680-Highlight Entire Row Blue
871-Highlight Entire Row Blue
827-Highlight Entire Row Blue
213-Highlight Entire Row Blue
833-Highlight Entire Row Blue
339-Highlight Entire Row Blue

Please let me know If I can post the excel spreadsheet, and whether or not I can be helped. Thanks !
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Just on the surface, I would have thought Conditional Formatting would be better than a macro.
You basically have 3 conditions, one for Orange, one for Yellow, and one (with a few OR statements in it) for Blue.

Assuming your data starts in A1, your conditions could be:
(Orange) Formula is =OR($W1=96,$X1=96)=TRUE
(Yellow) Formula is =OR($W1=237,$X1=237)=TRUE
(Blue) Formula is =OR($W1=402,$W1=680,$W1=871,$W1=827,$W1=213,$W1=833,$W1=339,$X1=402,$X1=680,$X1=871,$X1=827,$X1=213,$X1=833,$X1=339)=TRUE

Format painted across your entire range, this will highlight the entire row with the colours indicated without having to even run a macro.
 
Upvote 0
BTW, you can drop the =TRUE, OR returns TRUE/FALSE on its own.
 
Upvote 0
it seems when I enter the formula, It paints every row within the range.... but the ones that I want to have highlited,lol. It leaves the cells white that I want actually colored. Also I would like to have the entire row itself, not just within the range being searched. Thanks Can I email a copy of the excel sheet?
 
Upvote 0
I stand corrected. I just had to read into what you said a little bit more. I now understand it, and it works great. Sorry I have never worked with conditional formatting before. thanks !

Is there however anyway to create a macro, because I would like to be able to copy and paste a new report into my excel spreadsheet, and do the same thing to it. I run a report every week, and There are changing fields. Thanks !
 
Upvote 0
You should be able to record a macro while doing the format paint. Once you have the recorded macro, you should just need to adjust the range you are applying it to, to your new worksheet.
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,525
Members
448,969
Latest member
mirek8991

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top