LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default PasteSpecial xlPasteFormats

I have the below code to insert a conditional format into cell H2 and then
copy it from cell h3 to the last row with data in column h. But the
resulting conditional format ends up with this formula in each non-blank cell
in column h:
=$H65325="Unsigned but Inserted"

Macro:
With Range("h2").FormatConditions
.Delete
.Add(xlExpression, , "=$h2=""Unsigned but Inserted""").Font.ColorIndex
= 3
End With
With Range("h2")
.Copy
Range("h3:h" & Range("h65000").End(xlUp).Offset(0, 0).Row).PasteSpecial
xlPasteFormats
Application.CutCopyMode = False
End With
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why need to use Selection.PasteSpecial vs myRange.PasteSpecial [email protected] Excel Programming 4 June 25th 07 05:34 PM
PasteSpecial Paste:= xlPasteFormats problem Ken Johnson Excel Programming 4 March 21st 06 11:25 AM
PasteSpecial xlPasteFormats ends macro itarnak Excel Programming 4 October 12th 05 02:44 PM
Pastespecial and cut Ron[_23_] Excel Programming 4 April 26th 04 02:14 AM
vba pastespecial joao Excel Programming 2 November 14th 03 03:31 PM


All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"