Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Sorting a column

Bingo! thanks.

"Tom Ogilvy" wrote:

try

Dim rngSort as Range
Set rngSort = ActiveSheet.Range("F2")
rngSort.Sort Key1:=ActiveSheet.Range("F2")

--
Regards,
Tom Ogilvy


"elkrat" wrote in message
...
I have users that need to modify Excel (2000) files that are raw data

tables
dumped from an AS400 query. All the tables are identical in fields,

structure
etc and have to have the same modifications made to each. I have created
code that deletes the unwanted data, but I also need to sort on one

column -
Lname (column F). Because the files are only used to clean up and the list

of
names is then exported for other use, I had to create the code in a

permanent
second file - which is kept open. It would be nice if the code would sort
without making the user perform a separate sort.

this is the code I am using:

Dim rngSort as Range
Set rngSort = ActiveSheet.Range("F2")
rngSort.Sort Key1:=Range("F2")

I get an "error 400" when I run this. I think its because the code is in a
separate file. Any thoughts or suggestions would be helpful.




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
Column Sorting trvlnmny New Users to Excel 1 February 21st 10 02:30 AM
Sorting a Pivot Table Column that is not the first column... [email protected] Excel Worksheet Functions 1 October 10th 07 09:02 PM
How do I limit sorting a column to the column? Pat Excel Worksheet Functions 0 February 9th 06 04:01 PM
Right column doesn't change when sorting left column. nohope Excel Discussion (Misc queries) 2 July 19th 05 03:27 PM
Sorting a column regardless of whether a value if + or - Steve Excel Programming 1 October 5th 04 10:11 AM


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