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: 130
Default If X = Y then (when it doesn't have to be an exact match)

Range("A1:G65500").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

i = 2
n = 3

Do Until Cells(i, 1) = ""
Do Until Cells(i, 1) < Cells(i - 1, 1)
i = i + 1
Loop
Sheets("Calc").Cells(n, 13) = Cells(i, 1)
n = n + 1
i = i + 1
Loop

So I end up with a list of the unique names from one list put into another
list.

Two problems, the first, someone who seems to change their name from Joanne
to JOANNE . The sort seems to recognise that these two names are the same,
but the macro doesn't; what I then end up with is in the list of unique names
about 10 lines of the same person, alternating between upper case and normal.

Second problem, I do the exact same macro (sorting a different column, and
looking at that column for names) for a list of jobs, some of the Jobs have a
space or such after their name so they're not exact match.

Also, I have one job called "Advisor Slips" and another thats "Advisors
Slips" and that extra "s" makes them different.

Is there anyway I could solve any or all of these problems? Ideally I could
put that it doesn't have to be an exact match, only say 90% similar?
 
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
Find an exact match and go to that match Heath Excel Discussion (Misc queries) 0 February 12th 09 02:28 AM
Find Exact Match using INDEX, MATCH DoubleUU Excel Worksheet Functions 3 August 15th 08 02:42 PM
Match name not exact Samantha Excel Worksheet Functions 3 April 11th 06 01:12 PM
Getting an exact match Roland Excel Programming 1 January 25th 05 12:45 PM
Getting an exact match Roland Excel Worksheet Functions 2 January 25th 05 05:00 AM


All times are GMT +1. The time now is 07:05 AM.

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"