Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Match and Sort for two range of data on different worksheets? | New Users to Excel | |||
Using AutoFilter to Sort Data Pulled in by INDEX / MATCH | Excel Worksheet Functions | |||
Match and sort | Excel Worksheet Functions | |||
How to match and sort | Excel Discussion (Misc queries) | |||
How to match sort and lineup 2 sets of data | Excel Worksheet Functions |