ExcelBanter

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

Bob

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

Incidental

More efficient code
 
HI

You could try something like this

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

hope it helps

S



Bob Phillips

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




Bob

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



All times are GMT +1. The time now is 03:12 AM.

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