Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting files by name(i)
Hello group,
I am using the Application.filesearch and the following code If .execute(SortBy:=msoSortByFileName, _ SortOrder:=msoSortOrderAscending) 0 Then x = .FoundFiles.Count i = 0 For i = 1 To x Dim ActivePath As String ActivePath = .FoundFiles(i) Workbooks.Open (ActivePath) 'Then I am doing a Save As i_filename Next i ..... Example: I have 40 files named A1,A2,A3.....A10, A11,A12...A21,A23,A24.....A40. Files should be saved in the format: i_Ai i.e. 1_A1, 2_A2, 3_A3, 4_A4........ 40_A40 Instead I have the files saved in the following format 1_A1, 2_A10, 3_A11, 4_A12 etc.. Please let me know a way to save the files in the way I intend to save. Thanks! Kevin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting Values Without Sorting Formulas | Excel Discussion (Misc queries) | |||
Automatic sorting (giving max and min) based on custom sorting lis | Excel Worksheet Functions | |||
sorting in share files | Excel Discussion (Misc queries) | |||
Sorting VLookup vs Sorting SumProduct | Excel Discussion (Misc queries) | |||
Merge files & sorting data | Excel Worksheet Functions |