Hi Henry,
I could be wrong but your code is copying A1:C1 and not A2:C2, which
has the conditional formatting applied to them. Try amending the first
line of code to copy from row 2!
Good luck,
Les Bantleman
Henry Stockbridge wrote:
> Hi,
>
> When I attempt to copy the conditional formatting of the following, it
> does not copy correctly.
>
> a b c
> 1 First MI Last
> 2 Jack M Harris
> 3 Sally J Smith
> 4 Bill V Nelson
>
> Cells A2 - C2 have conditional formatting applied to them. I have
> attempted to Copy - Paste Special --> Formats, but this code fails:
>
> Range("A1:C1").Select
> Selection.Copy
> Range("A2").Select
> Range(Selection, Selection.End(xlDown)).Select
> Range("A2:C4").Select
> Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
> SkipBlanks:=False, Transpose:=False
>
> I will be calculating the row count via code (I don't have that handy)
> so the absolute reference to C4 will be replaced with C & rowcount.
>
> Any help you can lend would be appreciated.
>
> Henry
|