Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Si Si is offline
external usenet poster
 
Posts: 9
Default Match and Sort in a Macro

Hi All,
Thanks in advance for any Help.

I have a macro which opens a .csv file and places into Excel.
A2:AH19
colum B2 contains a number which is sorted lowest to highest
each row contains relevant information to that number
In colum AL I have the correct order for colum and row B2 coming from
another sheet
After Import of the .csv I want to sort all rows to match colum AL order.
Please Help got me stumped.
I am using MS Excel 2003
Here's my Macro so far

Sub Import()
'
' Import Macro
' Macro recorded 18/06/2006 by Si
'

'
Application.ScreenUpdating = False
ChDir "C:\CSV Files"
Workbooks.Open Filename:=Application.GetOpenFilename("Text Files, *.csv")
Range("A1:AH19").Select
Selection.Copy
Windows("Excel Workbook.xls").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Sheets("Sheet1").Select
Application.CutCopyMode = False
Range("A1").Select
Application.ScreenUpdating = False
End Sub

Yes .csv file is copied to another sheet want it sorted before copy to other
sheet.
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
Match and Sort for two range of data on different worksheets? Tan New Users to Excel 3 March 9th 06 08:55 AM
Using AutoFilter to Sort Data Pulled in by INDEX / MATCH A Romeo Jr Excel Worksheet Functions 7 January 30th 06 11:43 PM
Match and sort vijaya Excel Worksheet Functions 1 November 18th 05 09:23 PM
How to match and sort lakegoddess Excel Discussion (Misc queries) 0 November 14th 05 05:14 PM
How to match sort and lineup 2 sets of data VTALABRAT Excel Worksheet Functions 0 June 23rd 05 12:26 AM


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