PDA

View Full Version : Solved: Format certain cells in a worksheet



almouchie
01-06-2006, 03:47 AM
i have my sheet highlighted in different colors

I want to be able to format a row or a column except certain cells
is that possible

If not how can I write a code that says something like this

if column F=P then highlight cells F,G,H,I,J,K a certain color like yellow
& if cells in column B=1 then hightlight cells F,G,H,I,J,K a certain color like pink
if cells in column B=2 then hightlight cells F,G,H,I,J,K a certain color like blue
& so on

how can I start
any where would be great as record acro doesnt help really

Bob Phillips
01-06-2006, 04:13 AM
i have my sheet highlighted in different colors

I want to be able to format a row or a column except certain cells
is that possible

If not how can I write a code that says something like this

if column F=P then highlight cells F,G,H,I,J,K a certain color like yellow
& if cells in column B=1 then hightlight cells F,G,H,I,J,K a certain color like pink
if cells in column B=2 then hightlight cells F,G,H,I,J,K a certain color like blue
& so on

how can I start
any where would be great as record acro doesnt help really

You don't need VBA.

Select cells F,G,H,I,J,K in a row, let's say row 2
Menu Format>Conditional Formatting
Change Condition 1 to Formula Is
Add a formula of =$F2=$P2
Click the Format button
Select the Pattern Tab
Select pink
OK

Second condition

Click Add
Change Condition 2 to Formula Is
Add a formula of =$B2=1
Click the Format button
Select the Pattern Tab
Select yellow
OK

Third condition

Click Add
Change Condition 3 to Formula Is
Add a formula of =$B2=2
Click the Format button
Select the Pattern Tab
Select blue
OK
OK

almouchie
01-06-2006, 04:18 AM
thanks for ur prompt reply
I thought there must be a way in excel without using codes
i will try it now
it will help a lot

almouchie
01-06-2006, 04:54 AM
it is not working :(

what am i doing wrong
for the first condition I want yellow color if column F has a value of P
where p is a letter stands for paid
i changed formula to =$F2=P
still didnt work

almouchie
01-20-2006, 08:28 AM
thanks it worked out