Move data while keeping conditional formattin

Microsoft Office 2010 professional
August 4, 2010 at 02:34:51
Specs: Windows XP
Hi,

Can sombody help me with moving data while keeping the conditional format in the original cell.

I am using the following macro to move data to another sheet:

Sub MvCell()

Range("A1:C1").Offset(A).Select
Selection.Cut


Sheets("Sheet2").Select
Range("A1:C1").Select
ActiveSheet.Paste

End Sub

Unfortunately it also moves my conditional formatting. How do I (tell) excel to only move the text?

Kind Regards,

Paullieman


See More: Move data while keeping conditional formattin

Report •

#1
August 4, 2010 at 06:35:02
Hi,

This will copy cells A1:C1 on Sheet1, but only paste in the values from those cells into A1:C1 on Sheet2.
No formatting is copied.
You can use xlPasteFormulasAndNumberFormats
instead of xlPasteValues, and the ordinary cell formatting is copied, but not any conditional formatting.
Finally the source cells are cleared of contents, but the conditional formatting remains in-place.

Sub MvCell()
Worksheets("Sheet1").Range("A1:C1").Copy
Worksheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteValues
Worksheets("Sheet1").Range("A1:C1").ClearContents
End Sub

Regards


Report •
Related Solutions


Ask Question