# Off Topic > Tips and Tutorials >  >  VBA to Export and Re-Import Conditional Formatting Rules

## Junior1

Hey Everyone,

I am not sure if this is possible to do in VBA but could use some guidance. I have a Macro Enabled workbook A that contains hundreds of conditional formatting rules across several tabs. This workbook serves as a template. I am trying to find a way to export or print out all the conditional formatting rules including formula and named range references, range of cells the rules apply too, color and font etc ) to a separate worksheet which can than be copied and pasted into a new workbook and have a macro re-import all the conditional formatting rules by referencing this output sheet.

I can't post links yet but Extend Office has post on how to "Print all Conditional Formatting Rules" to a list but it does not account account for rules if the cell is blank, or include any formatting such as the color, font, boarder etc and also only does one tab at a time. I'd like to be able to export all the rules for the entire workbook and display all the possible formatting rules and re-import these to a operate workbook. 

Appreciate any help

----------


## Balbox

Hi Pepe Le Mokko,
Thank you for your explanation and messages clean up.
I will first try to make this tool Excel 64 bits compatible and then follow your tips.
And if you agree with your help, verify it also works on Excel Linux.
JP

----------


## Pepe Le Mokko

As it is VBA I doubt it will work on Linux. Play on Linux does not import the necessary libraries ( or whatever)
Anyway, I will give it a try

----------


## Balbox

Hello,

Here is a version compatible with Excel 64 bits which also improves the display of cell format and its related FC formats when typing [Ctrl + w].

JP

----------


## Balbox

Ohhh ! Ok, the site does not take the selected file name to upload it; On have also to click on a button which is completely on the other side of the page !
This is for selecting high university degree members only  :Smilie:  ?
Anyway, with your help I eventually managed to upload the file  :EEK!: 
Thank you

----------


## AliGW

Woo-hoo! I will tidy up the thread shortly.  :Smilie: 

*EDIT:* Thread cleaned up.

----------


## Balbox

Here is V1.8 that fixes a bug on FC Priority variable type.

----------


## zakn

Thank you Balbox. Your solution is very helpfull. This is after almost two years from posting!

----------


## zakn

> Here is V1.8 that fixes a bug on FC Priority variable type.



Hi Balbox,
How can I use your solution to copy all CF from one workbook and paste the same into several other workbooks in one go?

----------


## FDibbins

> Hi Balbox,
> How can I use your solution to copy all CF from one workbook and paste the same into several other workbooks in one go?



*Administrative Note:*

Welcome to the forum.  :Smilie: 

We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

Please see Forum Rule #4 about hijacking and start a new thread for your query.

If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

----------


## fatkinglet

thanks alot again

----------

