Link to home
Start Free TrialLog in
Avatar of trowa
trowa

asked on

Replicate Rule of Conditional Formatting

Is there any macro available to replicate a Rule of Conditional Formatting?

Let's say currently I got 3 rules in a selection/workbook, how can I replicate the first rule (green background with yellow font, or whatever) and become the 4th rule?

User generated image
Or in another word, use macro to read the Conditional Formatting Rules, and create a new Rule? Any ideas?

Thank you.
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

You can do this via VBA...here is a guide from Microsoft.
Side Note : I have found personally that the FormatCondition is a bit sensitive so add in your code
On Error Resume Next

Open in new window

I know its a bad practice but lets say that it will bypass many FormatCondition  hiccups
Avatar of trowa
trowa

ASKER

Hi John,

Not too sure if that worked in Excel but in the article, it mentioned:

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of trowa
trowa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of trowa

ASKER

No longer need a macro solution.