Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default How to copy a range of cells and paste into a new workbook in differentcolumns

Hi all,

I have created a macro that copies and a number of columns and pastes
them in a new workbook in a variety of columns but the macro look
unprofessional as it flickers between copying column A and paste in
column A of the new workbook, copy column C and paste in column B, etc.

I would like to copy a range i.e. column A, C, D, F, G in the open
workbook and paste in a new workbook in columns A, B, F, G, H. without
all the flicker between workbooks etc.

Appreciate any help I can get.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default How to copy a range of cells and paste into a new workbook indifferent columns

Put this line near the beginning of your macro:

Application.ScreenUpdating = False

and then after you have done all the copy/paste operations insert this
line near the end:

Application.ScreenUpdating = True

This will prevent the flicker as you switch between different sheets,
by not updating the screen display until you have finished. It will
also speed up your macro, though you might not notice this.

Hope this helps.

Pete

On Aug 16, 10:45*am, Mas wrote:
Hi all,

I have created a macro that copies and a number of columns and pastes
them in a new workbook in a variety of columns but the macro look
unprofessional as it flickers between copying column A and paste in
column A of the new workbook, copy column C and paste in column B, etc.

I would like to copy a range i.e. column A, C, D, F, G in the open
workbook and paste in a new workbook in columns A, B, F, G, H. without
all the flicker between workbooks etc.

Appreciate any help I can get.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 86
Default How to copy a range of cells and paste into a new workbook in different columns

Not using "select" will speed things up also.

A recorded macro will give you this................

Columns("B:B").Select
Selection.Copy
Sheets("Sheet6").Select
Range("C1").Select
ActiveSheet.Paste

The equivalent is this with no screen flicker......................

Columns("B:B").Copy Destination:=Sheets("Sheet6").Range("C1")


Gord Dibben Microsoft Excel MVP

On Tue, 16 Aug 2011 19:45:18 +1000, Mas wrote:

Hi all,

I have created a macro that copies and a number of columns and pastes
them in a new workbook in a variety of columns but the macro look
unprofessional as it flickers between copying column A and paste in
column A of the new workbook, copy column C and paste in column B, etc.

I would like to copy a range i.e. column A, C, D, F, G in the open
workbook and paste in a new workbook in columns A, B, F, G, H. without
all the flicker between workbooks etc.

Appreciate any help I can get.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 86
Default How to copy a range of cells and paste into a new workbook in different columns

Or this if all you need is values.

Sheets("Sheet6").Range("C:C").Value = _
Worksheets("Sheet1").Range("B:B").Value


Gord

On Tue, 16 Aug 2011 06:49:57 -0700, Gord wrote:

Not using "select" will speed things up also.

A recorded macro will give you this................

Columns("B:B").Select
Selection.Copy
Sheets("Sheet6").Select
Range("C1").Select
ActiveSheet.Paste

The equivalent is this with no screen flicker......................

Columns("B:B").Copy Destination:=Sheets("Sheet6").Range("C1")


Gord Dibben Microsoft Excel MVP

On Tue, 16 Aug 2011 19:45:18 +1000, Mas wrote:

Hi all,

I have created a macro that copies and a number of columns and pastes
them in a new workbook in a variety of columns but the macro look
unprofessional as it flickers between copying column A and paste in
column A of the new workbook, copy column C and paste in column B, etc.

I would like to copy a range i.e. column A, C, D, F, G in the open
workbook and paste in a new workbook in columns A, B, F, G, H. without
all the flicker between workbooks etc.

Appreciate any help I can get.

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
I'm unable to highlight a range of cells to copy and paste in exce Sharen Excel Worksheet Functions 1 January 28th 09 07:30 PM
Copy & Paste Across Sheet Tabs in a Range of Cells Karen Excel Discussion (Misc queries) 4 November 11th 08 10:25 PM
copy and paste cells non-randomly form range saman110 via OfficeKB.com Excel Discussion (Misc queries) 3 August 6th 07 06:14 PM
copy/paste won't refer to the appropriate range of cells debandstormy Excel Discussion (Misc queries) 1 August 30th 06 02:29 AM
How do I copy the contents of a range of text cells and paste into one cell? davfin Excel Discussion (Misc queries) 7 July 4th 06 08:16 AM


All times are GMT +1. The time now is 10:54 AM.

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"