copying conditional formating

J

Jorge

I want to know how can I copy my conditional formating without having to type
in the conditional formating row by row. How can i copy it?
 
V

Vergel Adriano

One way is to copy the cells then use Paste Special. From the main menu,
Edit->Paste Special, then select Formats.
 
J

Jorge

well, i have tried both ways including paint brush and its changing all my
worksheet all blue. this it the formula i am using:

condition 1: =IF($N$2="C",$A$2)
and i am formatting row 2 so if "C" is in N2, this is changing correctly
to blue background.
condition 2: =IF($N$2="CNC",$A$2)
and i am formatting row 2 so if "CNC" is in N2, this is changing correclty
to yellow background.

I have tried copying, painting, pasting and when i copy & paste, if I put a
"C" in cell N2, then the my whole sheet (rows 1-55) turn blue or if i in put
"CNC" the whole sheet (rows 1-55) turns yellow. I dont want it to do that.
 
V

Vergel Adriano

I believe it's because you're using absolute referencing style. Try using
these formulas when you set the conditional format of row 2:

condition 1: =IF($N2="C", TRUE)

condition 2: =IF($N2="CNC", TRUE)

This way, the row number would adjust when you copy it down. Not sure why
you use $A$2 in your formula, but using TRUE should work.
 
J

Jorge

Cool Vergel. that seems to have worked. Thanks.

one more thing. i have deleted all the macros in my worksheet, and every
time i open it, it give me the the option to enable or disable macros. I want
that security warning to stop popping up.
 
V

Vergel Adriano

You can set the macro security to Low by going to Tools->Macro->Security.
But it's not recommended because that would mean all other workbooks with
macros that you open will be automatically enabled.

The other way is to sign your vba project with a digital signature. Search
the help file for "digital certificate" and you'' find something there that
would teach you how to create a personal digital certificate. I personally
have not had the need to create one myself though.. Try reading up about the
digital certificates and post back a specific question that you might have.
I'm sure there'll be a lot around here who could help you out.
 
J

Jorge

THANKS A MILLION VERGEL. REALLY APPRECIATE IT.

Vergel Adriano said:
You can set the macro security to Low by going to Tools->Macro->Security.
But it's not recommended because that would mean all other workbooks with
macros that you open will be automatically enabled.

The other way is to sign your vba project with a digital signature. Search
the help file for "digital certificate" and you'' find something there that
would teach you how to create a personal digital certificate. I personally
have not had the need to create one myself though.. Try reading up about the
digital certificates and post back a specific question that you might have.
I'm sure there'll be a lot around here who could help you out.
 
D

David Biddulph

You don't need the IF(...,TRUE)

Try:

condition 1: =$N2="C"

condition 2: =$N2="CNC"
 

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