Macros - Automatically highlighting rows

  • Thread starter Thread starter Dolores
  • Start date Start date
D

Dolores

Is there a macro or formula that I can use to automatically highlight row
once a comment is inserted. I included a sample below

Name Address contact Status
No

If I put no in the status comment, I would like to have the entire row be
highlighted red.

Is this possible?
 
Rather than a macro, why not use Conditional Formatting?

Assuming Name, Address, Contact and Status are in Columns A
to D, and the header is in row 1, then highlight the area
where you will be entering data. With the cursor on cell
A2 choose "Format" "Conditional Formatting" and change from
"Cell Value Is" to "Formula Is". Enter the formula
$D2="No" and then click on "Format...", "Patterns" and
choose the red colour.

Whenever "No" is input in column D, Columns A to D of that
row will be highlighted in red.
 
Hi,

You don't need a macro. select all the rows where this will apply then
Format|Conditional Format
select Formula is
Enter the formula
=$D2="No"
Pick a colour
OK

Change the 2 to the top row of your range.

Mike
 
If you are going to highlight in red, make the text colour white so you can
still read your work.
 
Thanks,

This is exactly what I needed.

Mike H said:
Hi,

You don't need a macro. select all the rows where this will apply then
Format|Conditional Format
select Formula is
Enter the formula
=$D2="No"
Pick a colour
OK

Change the 2 to the top row of your range.

Mike
 
Back
Top