ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to automatically highlight a row? (https://www.excelbanter.com/excel-programming/296990-how-automatically-highlight-row.html)

jun liu

how to automatically highlight a row?
 
Hi

I am using excel 2003 in window xp

what i want to do is: in a row, if a cell is "Y", the whole row will change to red color. for example

row shipping ite
1 y item
2 n item
3 y item
....

I have more than 500 rows in worksheet. how should i write the code

thank you

jun

Kilo Bravo

how to automatically highlight a row?
 
I would just use conditional formating for this.


"jun liu" wrote in message
...
Hi,

I am using excel 2003 in window xp.

what i want to do is: in a row, if a cell is "Y", the whole row will

change to red color. for example:

row shipping item
1 y item1
2 n item2
3 y item3
....

I have more than 500 rows in worksheet. how should i write the code?

thank you,

jun




Rob van Gelder[_4_]

how to automatically highlight a row?
 
Highlight all the cells
From the Format menu, Conditional Format
Formula Is: =MATCH("Y",1:1, 0)
Pattern: Red

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"jun liu" wrote in message
...
Hi,

I am using excel 2003 in window xp.

what i want to do is: in a row, if a cell is "Y", the whole row will

change to red color. for example:

row shipping item
1 y item1
2 n item2
3 y item3
....

I have more than 500 rows in worksheet. how should i write the code?

thank you,

jun





All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com