How to copy color of the conditional formatting cell to another excel file
Solution 1
I would like to suggest you two possible methods. One is Non-programming & Second is Programming(VBA Macro).
Non-Programming Method:
- Open both Workbooks.
- Copy a cell from the original Workbook's Sheet, (from where you want to Copy the Conditional Formatting) to an unused position in the destination Workbook's sheet.
- Open the Manage Rules option of Conditional Formatting.
- Select Show formatting rules for This Worksheet.
- For each Rule, adjust the Applies to match the range you require.
- Click the Range button to the right of the Applies to.
- Click-drag-select from the top left cell to the bottom right cell.
- Click the Range button to return to the Conditional Rules Manager.
- Click OK or Apply to get the result.
Programming Method:
At Source File press
Alt+F11
to open the VB Editor.Copy & paste this code as Standard module.
Sub CopyFormat() Application.DisplayAlerts = False Dim wbSource As Workbook Set wbSource = Workbooks.Open(Filename:="source.xlsm", UpdateLinks:=3) wbSource.Sheets(1).Range("A1:H100").Copy Selection.PasteSpecial _ Paste:=xlPasteValues Selection.PasteSpecial _ xlPasteFormats wbSource.Close Application.DisplayAlerts = True End Sub
Note:
- You can edit Worbook & Sheet name as per your need.
- Adjust cell references for the Copied Range as needed.
Solution 2
If you do not need the formula for the conditional formatting, if you copy it to MS Word and back to Excel the color should be copied as well.
Related videos on Youtube
Paracsys
Updated on September 18, 2022Comments
-
Paracsys almost 2 years
On one sheet I have a data which has conditional formatting color.
I want to copy and paste that into another file, I was able to paste value, column width etc. but I couldn't paste the color from the conditional formatting.
I researched and the suggestion was to paste it in word and then back to excel but that ruins my excel row and column formatting.
How to do that? Is it possible?
-
Lee almost 6 yearsOpen 2 Workbook in the same instance, then you can copy format color to another workbook.
-