Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jbm Jbm is offline
external usenet poster
 
Posts: 28
Default Move data to top of column

Hi,
I'm working in Excel 2007 and I have data in columns A-E, contiguous, and
far less data in G-K non contiguous. All I need to do is move the data in
G-K to the top of the sheet (accounting for a header), still in the same
columns, while leaving A-E untouched. Order is unimportant, could be
alphabetical or anything. The piece of code I tried to use was

Cells.sort Key1:=Range("G:K")

Which moved the data to the top, but didn't account for a header and oddly
copied itself into A-E in the same top rows while moving those original A-E
rows down.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Move data to top of column

Use this:
Range("G:K").Sort Key1:=Range("G2"), Header:=xlYes
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
move column data based on value of another column [email protected] Excel Programming 0 January 8th 07 04:05 PM
how to move the cursor to column A after entering data column F tskaiser New Users to Excel 2 April 29th 06 02:28 PM
How can I cut data from one column and move it to another. mhbond999 New Users to Excel 2 October 16th 05 03:06 AM
Move data from row to column Jenny Excel Discussion (Misc queries) 3 April 13th 05 02:41 PM
create macro to move label type data to column data JonathonWood9 Excel Programming 4 February 21st 05 10:53 PM


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