ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   More efficient code advice needed (https://www.excelbanter.com/excel-programming/339880-more-efficient-code-advice-needed.html)

Linking to specific cells in pivot table

More efficient code advice needed
 
Hi - I've been writing code in what I'm sure is an inefficient way -- can
someone just tell me what the recommended way would be to re-write the
following code? Thanks!

Sheets("Data for Graphs").Select
Columns("D:H").Select
Selection.Copy

Sheets("Copy of Data for Graphs").Select
Columns("J:N").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Bob Phillips[_6_]

More efficient code advice needed
 
Worksheets("Data for Graphs").Columns("D:H").Copy

Worksheets("Copy of Data for Graphs").Select
Range("J1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
_
:=False, Transpose:=False
Application.CutCopyMode = False


--
HTH

Bob Phillips

"Linking to specific cells in pivot table"
crosoft.com wrote in
message ...
Hi - I've been writing code in what I'm sure is an inefficient way -- can
someone just tell me what the recommended way would be to re-write the
following code? Thanks!

Sheets("Data for Graphs").Select
Columns("D:H").Select
Selection.Copy

Sheets("Copy of Data for Graphs").Select
Columns("J:N").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks

_
:=False, Transpose:=False




Linking to specific cells in pivot table

More efficient code advice needed
 
Thanks Bob!!

"Bob Phillips" wrote:

Worksheets("Data for Graphs").Columns("D:H").Copy

Worksheets("Copy of Data for Graphs").Select
Range("J1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
_
:=False, Transpose:=False
Application.CutCopyMode = False


--
HTH

Bob Phillips

"Linking to specific cells in pivot table"
crosoft.com wrote in
message ...
Hi - I've been writing code in what I'm sure is an inefficient way -- can
someone just tell me what the recommended way would be to re-write the
following code? Thanks!

Sheets("Data for Graphs").Select
Columns("D:H").Select
Selection.Copy

Sheets("Copy of Data for Graphs").Select
Columns("J:N").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks

_
:=False, Transpose:=False






All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com