LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Sorting file names

This challange has caused many (new) grey hairs and none of the approaches I
have tried is working for me. I hope someone can help me out!!!

I have a folder that contain files with names containing two parts:
XX-YY.xls (both XX and YY are numeric values).

In a template file cell A1 is an XX number located. It is also in the
template the code should be located.

The code should read the value in cell A1 and look at files containing this
number (XX). Of the XX files the file name with the highest YY value should
be identified and the template should now save itself with the name
XX-YY+1.xls.

If the XX in cell A1 does not exit the filename should be XX-01.xls.

Let's say the folder contain these files:
01-01.xls
01-02.xls
01-03.xls
02-01.xls

If cell A1 is:
01 the file should be named 01-04.xls
02 the file should be named 02-02.xls
03 the file should be named 03-01.xls

Does this make any sense? If so I would really appreciate your help!

Thanks
The Doctor

 
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
Sorting and matching rows of names with Socials with master list and eliminating the extra names Giacomo Excel Worksheet Functions 1 March 10th 07 01:52 AM
Sorting names in Name box Dannycol Excel Worksheet Functions 1 April 5th 06 08:15 PM
Sorting names in Name box Duke Carey Excel Worksheet Functions 0 April 3rd 06 05:15 PM
Sorting file names Gordon Excel Discussion (Misc queries) 4 November 30th 05 02:33 AM
sorting names alphabetically when names may start with numbers John Smith Excel Discussion (Misc queries) 3 May 11th 05 08:06 PM


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