I use this line of code to copy the contents of one workbook to another, but it only copies the values (and avoid getting #VALUE errors), but I am hoping to copy the color of the cell as well:
Workbooks("Payroll Data.xlsm").Worksheets("Pay-MR Compiled").Range("A" & Total_rows_PayMRCompiled + 1 & ":BD" & Total_rows_PayMRCompiled + Total_rows_PayMR - 1).Value = ThisWorkbook.Worksheets("Pay-MR").Range("A2:BD" & Total_rows_PayMR).Value
My issue is that when I copy Values & Source Formatting, it also copies the conditional formatting rules and because my condition is using something like NOT(ISFORMULA(A2)) function to check whether the cell is a formula or not, and the paste is only values, all will be colored.
For instance, only 1 cell is highlighted in the actual data as shown below:
But what happens when pasting with Values and Source Formatting is:

