LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default macro question - selecting the right column

I have information in columns from C to CA that I need to put (cut) into
column C

The following macro lacks one item - an ability to keep moving over to the
correct column and cutting the appropriate items. By this I mean
Range"D2".select then Range"E2".select ... This process will have to go until
I reach Range"CA2".select

Any help would be appreciated

Sub cutandcopy()
'
' cutandcopy Macro

'

'
Range("D2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("C2").Select
Selection.End(xlDown).Select
Range("C122").Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("C2").Select
Selection.End(xlDown).Select
Range("C242").Select
ActiveSheet.Paste
End Sub

 
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
VBA question about selecting worksheets jlclyde Excel Discussion (Misc queries) 3 April 17th 08 04:39 PM
Text to column and selecting values based on a different column torooo Excel Worksheet Functions 5 October 21st 06 03:35 PM
Text to column and selecting values based on a different column [email protected] Excel Worksheet Functions 1 October 21st 06 03:10 AM
Text to column and selecting values based on a different column torooo Excel Discussion (Misc queries) 1 October 18th 06 07:27 PM
Excel Macro question? Column position Arul Excel Programming 3 August 19th 04 04:45 AM


All times are GMT +1. The time now is 04:53 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"