I tried the link's suggestion. I double-checked the code to make sure I copied and pasted it correctly, but the macro failed. ...and I'm not up to snuff on troubleshooting VBA. I tried changing the file extension from .xls to .xlsm, but to no avail. Are you able to troubleshoot it?
Here you go...Do you have a sample file that I can work with?
Sub Copy_All_Defined_Names()
Dim x As Name
Dim i As Integer, numberofnames As Integer
numberofnames = ThisWorkbook.Names.Count
For i = 2 To numberofnames
Workbooks("Book2.xlsx").Names.Add Name:=ThisWorkbook.Names(i).Name, RefersTo:=ThisWorkbook.Names(i).Value
Next i
End Sub
Sub Copy_All_Defined_Names()
Dim x As Name
Dim i As Integer, numberofnames As Integer
numberofnames = ThisWorkbook.Names.Count
For i = 2 To numberofnames
Workbooks("Book2").Names.Add Name:=ThisWorkbook.Names(i).Name, RefersTo:=ThisWorkbook.Names(i).Value
Next i
End Sub
I tried that and it copies too much. i.e. If the source has data with highlighting all that highlighting gets transferred as well as the process sees the highlighting as part of the Conditional Formatting when it is not. It works great if there's no data, so I have started creating a "dummy tab" solely for use with Conditional Formatting as a source to copy from.Hi ,
As far as copying conditional formats is concerned , does this not work the way it is suggested here :
https://stackoverflow.com/questions/38918475/copy-conditional-formatting-between-workbooks
Narayan