hardcoding conditional formating

mhobbs

New Member
Joined
Dec 10, 2010
Messages
21
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
Can I hardcode conditional formatting? I need to copy cell colors to a table the same size with data that does not meet conditional rule.<o:p></o:p>
<o:p></o:p>
Thanks,<o:p></o:p>
<o:p></o:p>
Marland<o:p></o:p>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Unfortunately not... The only thing you can copy to a new cell would be the "logic" that drives the conditional formatting, not the formatting itself.
 
Upvote 0
Unfortunately not... The only thing you can copy to a new cell would be the "logic" that drives the conditional formatting, not the formatting itself.

There is a way to copy the actual conditional formatting (hard code the format) if it's formula driven but you'll need to work off a temporary table first. For my example the conditional format I have is =if(A1=0,1,0); if that is met, the cell shaded green.

Steps to hard-code the conditional formatting:
  • Copy the conditional formatting formula into a temporary table (same size, etc.)
  • Change the formatting formula to be =if(A1=0,"A",1)
  • Select the temporary table
  • Select only cells that have text (this will select only the cells with A, aka cells that meet the formula criteria). See below if you have questions on how to do this.

  • Change the color of the cells
  • Voila--hard coded conditional formats that can be paste-special'ed onto the original table

To select only cells that have text do the following:
  • Select the table
  • hit F5 or Go To
  • hit Special
  • Select the Formula radio button
  • Uncheck each option until only the Text box is checked
  • hit okay
  • Excel will select only text values from the formula

This was tested in Excel 2007.
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top