conditional fill colour

A

AK

hi - hope someone can help!
i've got 5 cells in a row - i want to be able to input a number ( 1 to
5 ) into the 6th cell and automatically colour in the respective cell.
for example if i input number 3 - then i want cell number 3 to change
colour and all the rest to remain unfilled.

i've tried conditional formatting but that will only change the colour
of the input cell. i've tried the if function too but there doesn't
seem to be a option for changing cell colour.

any ideas?

cheers

AK
 
J

Jan Karel Pieterse

Hi Ak,
hi - hope someone can help!
i've got 5 cells in a row - i want to be able to input a number ( 1 to
5 ) into the 6th cell and automatically colour in the respective cell.
for example if i input number 3 - then i want cell number 3 to change
colour and all the rest to remain unfilled.

You could use the formula option of the conditional format and use this
formula (this assumes your cells are in A:E and the cell with the number
is in F1):

=COLUMN()=$F$1

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
 
S

SteveG

AK,

So long as you only want to change your cells to one color you coul
use conditional formatting. Say your row is A1:F1 where F1 is the 6t
cell or value that you want to use to base the conditional formattin
on. In A1 go to conditional formatting. Change the Cell Value is t
Formula is and enter the following.

=COLUMN(A1)=$F$1

Click Format and the Patterns. Select the color you want to apply i
the condition is met. Click OK, OK. Then apply the conditiona
formatting to cells B1:E1 using the format painter. If you type in
number from 1-5 in F1, you should see the corresponding cell chang
color.


HTH

Stev
 
S

SteveG

Note: You could specify up to 3 colors based on your values in F1 bu
you could not have 5 different colors, one for each cell usin
conditional formatting.

Stev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top