Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a one litlle problem. I wnat copy some range for ex. A1:I22 to another sheet. I need copy evrything (data,format...), but excel copy all except width row. Is there some way how can I copy evrythnig? In VB of course. Thanks for your advice TOM |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rows don't have width, columns do. If you copy/paste entire columns,
the width will also be transrerred. Otherwise you will have to manually adjust the destination width. Jerry TOM wrote: Hello, I have a one litlle problem. I wnat copy some range for ex. A1:I22 to another sheet. I need copy evrything (data,format...), but excel copy all except width row. Is there some way how can I copy evrythnig? In VB of course. Thanks for your advice TOM |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Sub CopyAll() Dim sourceRng As Range, destRng As Range Dim i As Long Dim ws1 As Worksheet, ws2 As Worksheet Set ws1 = ActiveWorkbook.Worksheets("Sheet1") '<<<< CHANGE Set ws2 = ActiveWorkbook.Worksheets("Sheet2") '<<<< CHANGE Set sourceRng = ws1.Range("A1:I22") '<<<< CHANGE Set destRng = ws2.Range("D5") '<<<< CHANGE sourceRng.Copy With destRng ..PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False, _ Transpose:=False ..PasteSpecial Paste:=8 ' Column widths For i = 1 To sourceRng.Rows.Count ..Rows(i).RowHeight = sourceRng.Rows(i).RowHeight Next i End With End Sub --- Regards, Norman "TOM" wrote in message ... Hello, I have a one litlle problem. I wnat copy some range for ex. A1:I22 to another sheet. I need copy evrything (data,format...), but excel copy all except width row. Is there some way how can I copy evrythnig? In VB of course. Thanks for your advice TOM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and paste versus copy and insert copied cells | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
EXCEL FILE a copy/a copy/a copy ....filename | New Users to Excel | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming | |||
How copy format, font, color and border without copy/paste? | Excel Programming |