Change color of row depending on first row cell entry

jcmaco

New Member
Joined
Oct 29, 2002
Messages
3
Hello,

would it be possible to change the color of a segment of a row (say A1:A10) depending on a number located in the first cell of the row (A1). So if A1 has the number 2 in it, I would like the rows A1:A10 to have the text red.

But the number 2 could also be in the cell C1 and C1:C10 would also need to be red.

I suppose this is possible with a macro, but unfortunetly, I do not know how to code VBA.

If anyone could help me, I would greatly appreciate it,

Julian
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Depending on how many criteria you have, you could just use Conditional Formatting off of the Format menu.

If you need more than 3, you'll have to resort to a macro. If that's the case, it's been mentioned more than occasionally. Just use the search function of this board and search for "conditional formatting for more than 3" or something like that :)
 

bigbob

Board Regular
Joined
May 31, 2002
Messages
82
This is certainly possible using Conditional Formatting which should be available in the Help index
Bigbob
 

jcmaco

New Member
Joined
Oct 29, 2002
Messages
3
Ok it worked, but it could have worked better...I used the Format painter, is there another way?

Thanks
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Wait, I'm confused. When you say "it worked..." were you talking about the Format Painter or the Conditional Formatting feature I described on the Format menu?

:confused:
 

jcmaco

New Member
Joined
Oct 29, 2002
Messages
3
Conditional formating only worked for one cell. (If Cell = 1, text color = red). Then if I used the format painter over the other colums, it did not work. So what I tried was if Cell biggerorequalthan 1, text color = red). So now all the colums are red, and if I change the 1 to something else, the red disapears.
 

Forum statistics

Threads
1,144,273
Messages
5,723,436
Members
422,497
Latest member
dougy99

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
Top