Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default More efficient code

I need to move column E over to column A (column A is empty). Is there a
more efficient way (ideally using 1 line of code) to write the code for this
operation other than:

ActiveSheet.Columns("E:E").Cut
ActiveSheet.Range("A1").Select
ActiveSheet.Paste

Thanks in advance for any help.
Bob
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default More efficient code

HI

You could try something like this

ActiveSheet.[E:E].Cut Destination:=[A:A]

hope it helps

S


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default More efficient code

activesheet.columns("C:C").cut activesheet.range("A1")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Bob" wrote in message
...
I need to move column E over to column A (column A is empty). Is there a
more efficient way (ideally using 1 line of code) to write the code for
this
operation other than:

ActiveSheet.Columns("E:E").Cut
ActiveSheet.Range("A1").Select
ActiveSheet.Paste

Thanks in advance for any help.
Bob



  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default More efficient code

"S" and Bob,
Thanks for your help. As always, I greatly appreciate it.
Bob

"Bob" wrote:

I need to move column E over to column A (column A is empty). Is there a
more efficient way (ideally using 1 line of code) to write the code for this
operation other than:

ActiveSheet.Columns("E:E").Cut
ActiveSheet.Range("A1").Select
ActiveSheet.Paste

Thanks in advance for any help.
Bob

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
How can this code be made more efficient? Mike Woodhouse[_2_] Excel Programming 0 December 14th 06 03:24 PM
Can anyone help me convert to more efficient code? slo Excel Programming 2 August 4th 06 05:01 PM
Efficient Code GregR Excel Programming 7 June 27th 05 04:09 PM
More Efficient code than this thom hoyle Excel Programming 14 May 11th 05 07:40 AM
More efficient code Rob Bovey Excel Programming 1 July 9th 03 04:46 AM


All times are GMT +1. The time now is 09:45 PM.

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

About Us

"It's about Microsoft Excel"