funtions for colors for fonts or cell backgrounds?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to use a function in a cell to reference another cell and also
make the other cell change colors in background or font. It would be like
using conditional formatting but it would be controlled in a cell. It would
look like this:
=if (A1>0,A1 background is yellow, leave as is)

Are there cell formula change color functions for background and fonts?

Thank you
 
You can use conditional formatting in A1 (in your example) to do what you
described, without involving any other cells.

There are no built-in Excel functions for working with the colors of cells
or fonts. It is possible to write VBA functions to do this. Chip Pearson has
info on his site:
http://www.cpearson.com/excel/colors.htm

But it looks like conditional formatting is all you need, unless there are
additional factors not yet revealed.

Hope this helps,

Hutch
 
I have a similar type question, I have thousand of lines of information
an need to have duplicate infromation highlighted or font color change
for easy viewing. I sort the worksheet by the part number column "B"
Example:
Row Column "B"
1 H0000983400008
2 H0000983400009
3 H0000983400010
4 H0000983400010
5 H0000983400010
6 H0000983400011
7 H0000983400012
8 H0000983400013
9 H0000983400014
10 H0000983400015
11 H0000983400016
12 H0000983400017
13 H0000983400018
14 H0000983400019
15 H0000983400020
16 H0000983400021
17 H0000983400022

I would like the cell to highlight or change the color of font on cells
4B & 5B, because this part number has appeared in the row above.
 
You should probably start a new thread, rather than piggybacking on another
one. Nevertheless...

Using the sample data & layout you provided, try the following:

1. Select cells B2:B17 (or whatever the last row of data is)
2. Select Conditional Formatting from the Format menu
3. Change 'Cell Value Is' to 'Formula Is'
4. In the textbox, enter =(B2=B1)
5. Click the Format button and select the formatting options you want to
appear if the condition is TRUE (red bold text, etc.)
6. Click OK

Hope this helps,

Hutch
 
This is very helpful. Thank you very much.

Tom Hutchins said:
You can use conditional formatting in A1 (in your example) to do what you
described, without involving any other cells.

There are no built-in Excel functions for working with the colors of cells
or fonts. It is possible to write VBA functions to do this. Chip Pearson has
info on his site:
http://www.cpearson.com/excel/colors.htm

But it looks like conditional formatting is all you need, unless there are
additional factors not yet revealed.

Hope this helps,

Hutch
 

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

Back
Top