How do i copy a colored cell to another cell using a formula

R

rick

i am trying to set up a formula to copy a colored empty cell to another cell
and have the color show but nothing else
 
J

Jim Thomlinson

Formulas only deal with the values in the cells and not the fomratting of the
cell. Additionally formulas return values and not formats... The only
solution is to use relatively sophisticated (could not record it no matter
how hard you tried) macros...
 
P

Pete_UK

The way you have phrased this is misleading, and what Jim has said is
correct.

However, if you had asked how you can colour a cell if both it and
another cell is empty, then people would be suggesting conditional
formatting to you.

So, suppose the coloured empty cell you mention first is A1 and the
other cell that you want to "copy" this to if empty is G1. Select G1
and click on Format | Conditional Formatting, and then select Formula
Is rather than Cell Value Is in the first box, and enter this formula
in the next box:

=AND(G1="",A1="")

Click on the Format button and select the Patterns tab (for background
colour) and choose the colour you wish. Click on OK twice to exit the
dialogue box, and then you shoudl have the effect you require - enter
something into either A1 or G1 (or both) and G1 will remain un-
coloured. However, if both A1 and G1 are empty then G1 will be
coloured.

Hope this helps.

Pete
 

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