Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007 - Copy & Paste Only Fill Colur 4

Status
Not open for further replies.

greengo204

Technical User
Apr 7, 2009
56
AU
Not sure if this is possible but is there a way to copy any paste just the fill colour of a cell?

I've tried "copy & paste special > formats" but that paste all the cells formatting. I am specifically looking for just the fill colour. If this can't be done with the usual features i would be happy with a VBA solution.

Regards,

 
Could a format validation serve your needs here?
 
Possible i have been attempting that method unsuccessfully.

Additional info:

I am trying to fill a cell conditionally with colour is the cell contains a formula.

I have been using a custom function (VBA) to identify if the relevant cell has a formula and then coditionally format the cell if the formula returns "TRUE". I was hoping to paste the colours over the origanal cells that contain the formula. But this method has flaws as you cant conp and paste conditional formatted colours as values.

any suggestions?

 




Hi,

Rather than tell us HOW you want to accomplish (copy 'n' paste interior color), please tell us functionally WHAT you are trying to accomplish, like when the data in the row means this, then make this happen.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
fair point.

i am trying to conditionally format a cell (fill colour) if the cell contains any formula.

any suggestions?

 



The Conditional Format FEATURE in Excel uses DATA VALUES to make that sort of determination.

If you want to test for the presence of a FORMULA, you can use one of the IS functions. ISREF() is the logical choice, although I have not achieved consistent results. Also check out ISNUMBER() and ISTEXT(). Do you CF, based on the outcome of these functions.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Tested in Excel 2007.

Try this:
Under formulas tab, click on define name.
In the refers to box put =GET.CELL(6,Sheet1!$A1)
where A1 is the first cell in your Conditional formatting range.

and in the name box type in some sort of description like FormIs. Click OK

Select A1:A3 (where one of the cells contains a formula)with A1 as the active cell, under the Home tab go to conditional formatting, New Rule.

select "Use a formula to determine which cell to format"
and for "Format Values where this formula is true"
and type in =LEFT(FormIs)="="

and select your format

A man has only two choices: He can be right or he can be happy.
 
Hi,

I have an Excel AddInn called "Paste Special Plus" which provides a further 22 options beyond Excel's Paste Special facility, including just copy the Fill Colour.

It is from Andrew Engwirda's site:


You will see it on the left under Tips and Dowloads.

Good Luck!

Peter Moran
 
xlhelp: Thanks thats what i was looking for.

Petermoran: Cheers i will look into that plugin as im sure i may have other uses for it.

Regards,

 
I am trying to conditionally format a cell (fill colour) if the cell contains any formula."

CNTR + G,
Special...,
Formulas, and then choose the colour from formats.

Yuri
 
This is perhaps also the place to mention again the barely-known key-combination ctrl-` (top left key on my UK keyboard), which toggles between displaying values and showing formulae. Doesn't do what you asked, but it does show at a glance which cells are formulae, if that's the underlying need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top