LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Frantic Excel-er
 
Posts: n/a
Default Macro - Data Sort -Variable Selection

Hi all!!!

I am trying to get my macro to run a sort in a non specific cell for column
D.....there are many steps up to this point, I will include the last couple
in the code...here is what I have so far....

Columns("C:C").Find(What:="x").EntireRow.Insert
Columns("C:C").Find(What:="x").EntireRow.Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("D63"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

Instead of the range being specific for D63, I want it to select the D
column after if finds X to the end of the wkst. Any ideas on how I can
accomplish this???

Thanks in advance......


 
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
Getting data from another workbook based on variable joemc911 Excel Discussion (Misc queries) 3 May 25th 05 09:18 AM
sort data without formulas in other cells changing? Vicky Excel Discussion (Misc queries) 2 March 15th 05 01:17 PM
macro to browse for workbook, pick up data and looping uriel78 Excel Worksheet Functions 1 March 10th 05 12:37 PM
Extract specific data into its own workbook via macro? Adrian B Excel Discussion (Misc queries) 2 February 24th 05 06:09 AM
Data > Sort function amnesia? Dave D Excel Discussion (Misc queries) 1 November 29th 04 10:44 PM


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