Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Copy format without copy & paste

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!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Copy format without copy & paste

Maybe I should tell the format to transfere is in the visual way (frame,
background, font etc.

It should NOT transfere number format, date format, percent etc.

/Regards


"Gunnar Johansson" skrev i meddelandet
...
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!





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Copy format without copy & paste

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!





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default That's a copy & paste method (PasteSpecial)...

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!







  #5   Report Post  
Posted to microsoft.public.excel.programming
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!











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Thanks! But it is already a Sub/procedure/macro like yours...

Hi David,

Thank you for your effort! I'm sorry if I described unclearly. I have a
procedure in a sheet module now, using copy-paste like you've written down
for me now. There is a lot of rows divided on several different areas, so
there is a lot of code now and I feel I'm loosing control and speed.
Therefore, I wondered if there is an other way than copy-paste in the
Sub/procedure/

Hope this will clarify,

Regards



"David McRitchie" skrev i meddelandet
...
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!











Reply
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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
copy / paste format marco g 3284 Excel Worksheet Functions 1 August 12th 08 09:15 PM
Copy and Paste in certain format sa02000 Excel Worksheet Functions 3 March 25th 06 06:04 AM
Copy and Paste and keep format the same Brian Caraher Excel Discussion (Misc queries) 1 March 17th 05 02:05 PM
How copy format, font, color and border without copy/paste? Michel[_3_] Excel Programming 1 November 5th 03 04:43 PM


All times are GMT +1. The time now is 02:10 PM.

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

About Us

"It's about Microsoft Excel"