View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default That's a copy & paste method (PasteSpecial)...

And recording a macro works or not?
copy and paste, special to do the formatting

Sub Macro1()
Range("A10:A14").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A10").Select
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub

Sub Macro1()
Sheets("sheet1").Range("A10:A14").Copy
Sheets("Sheet2").Range("b10").PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Gunnar Johansson" wrote in message ...
It has to be in VBA.
/Regards


"Jim May" skrev i meddelandet
news:inxEc.20765$WI2.14551@lakeread05...
How bout using the Format-Painter (Icon) method?

"Gunnar Johansson" wrote in message
...
Hi,
I have merged cells , let's say in sheet1:
Reference A10 has MergeArea "A10:A14"

I want to have the same format on a similar merged area in sheet2:

"B10:B14"

Now the procedure is a copy - paste solution, but I doesn't like that.

How can I "transfere" the format?

Thanks for any help!