View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Neal Zimm Neal Zimm is offline
external usenet poster
 
Posts: 345
Default Macro for Special Sorting

Hi K,
What you have is a two file (columns A and B) matching program to write
where a match between A and B is not guaranteed.

Is the following true?
names start in row 1 in a column and when the cell in the column is null
the "end" of your file has been reached ?

There is alway at least 1 space between the first name and the last ?

there are only two names, first and last.

At the end of the last name is either a space, or a "." ?

the text between the last letter of the last name and the "." can be
treated as one block of text ?

If yes to all of the above, I'll work up a skeleton macro which you
should be able to finish.

Neal Z.

--
Neal Z


"K" wrote:

I have file names listed in column A and B like (see below)

A B€¦€¦col
Jim Boot - data.xls John Wood (Record List).xlsx
Ali Khan (data).xlsm Dean Wild - system.xls
Bob Will.xlsx Jim Boot (actuals).xlsm
John Wood.xls Kam Finch.xlsx
Ali Khan (Recorded data).xls

The special thing about file names listed in column A and B is that
the first two words in those are always the first name and last name
of the person. I am looking for a macro which should sort both these
columns lists alphabatically and also the way that same name should
come in same row. so i am looking for the result something like (see
below)

A B€¦€¦col
Ali Khan (data).xlsm Ali Khan (Recorded data).xls
Bob Will.xlsx
Dean Wild - system.xls
Jim Boot - data.xls Jim Boot (actuals).xlsm
John Wood.xls John Wood (Record List).xlsx
Kam Finch.xlsx

I'll be very thankful if any friend got sultion for this kind of
sorting.
.