ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell Formatting when copying (https://www.excelbanter.com/excel-programming/289580-cell-formatting-when-copying.html)

Bob O

Cell Formatting when copying
 
I am a using the following code to copy a column and insert beside active cell...

Sub AddColumn(
ActiveCell.Offset(0, 1).EntireColumn.Inser
Range("A14:A21").Copy ActiveCell.Offset(0, 1
Selection.PasteSpecial Paste:=xlFormulas, Operation:=xlNone, SkipBlanks:=
False, Transpose:=Fals
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:=
False, Transpose:=Fals
Selection.PasteSpecial Paste:=xlDataValidation, Operation:=xlNone,
SkipBlanks:=False, Transpose:=Fals
End Su

It works except....I am using conditional formatting and UDF isformula to determine if my formula has been overtyped. The cell fill is yellow and CF makes the cell white when formula is present. When the column is copied the CF, tand the formula is copied, but the yellow cell fill is not. Im gueesing that it has something to do with the copied column having a formula in B17 and is white when it is copied. How can I copy over the the yellow cell fill

Many thanks in advanc
Bob


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com