View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
-JB-[_8_] -JB-[_8_] is offline
external usenet poster
 
Posts: 1
Default I Tried it, still problem...

Thanks again Dick. At the risk of sounding repetitious, I hope that I
can do something for you in return.

You wrote:
I think I got everything until here. Find an exact match to what? The

last column on TEMP will be a list of matches for the last word in G9.
So what do you want to Find in that column?<

This macro didn't work quite right, and I think it's because of this:

The First word it searches it should search the "SCIT"page. For every
subsuquent words it searches, it should search the last column of the
"TEMP"page (where the results are sent to). When it has searched all
words in the query, then it searches the last column of the "TEMP"page
for exact an match (nothing more, nothing less). This will produce the
inverted match, through a process of elimination.

Using the example of a query "S5 Q3 R9 "

1.)Search "SCIT"page for "S5 "
(FIND ANYTHING WITH AN "S5" IN IT, it should not find "S65 ", OR "5S
")
Returns to "TEMP"page/ColumnA:
"Q3 R9 S5 "
"Q3 R9 S5 T "
"S5 J K "
"L M S5 "
"L R9 S5 "
"Q3 S5 K "
"R9 S5 "

*********NOTE: For now on macro searches the "TEMP"page...
2.) Search "TEMP"page/ColumnA for "Q3 "
(FIND ANYTHING WITH AN "Q3" IN IT, it should not find "Q93 ", OR "Q
")
Returns to "TEMP"page/ColumnB:
"Q3 R9 S5 "
"Q3 R9 S5 T "
"Q3 S5 K "

3.) Search "TEMP"page/ColumnB for "R9 "
(FIND ANYTHING WITH AN "R9" IN IT, it should not find "R39 ", OR "R
")
Returns to "TEMP"page/ColumnC:
"Q3 R9 S5 "
"Q3 R9 S5 T "

4.) Search "TEMP"page/ColumnC an EXACT MATCH "S5 Q3 R9 "
(FIND "S5 Q3 R9 " (nothing less, nothing more)
Return to "TEMP"page/ColumnD:
"Q3 R9 S5 "
(If no exact match is found, Enter into cell of "TEMP"page/ColumnD: "No
Exact Matches...See Related Matches")

Bingo.
The query was "S5 Q3 R9 "
The inverted/exact match is "Q3 R9 S5 " (an inversion of the query).


One other thing...
You wrote:
However, not with a space at the end will still return "cannot", so I

put a
space before and after each word in G9. It's in the What argument of
the
Find method, so you can change that if it's not right.<

For my purposes, it would be better to not search for a space before
each word in the query. I'm not sure how to change the What argument. A
search for "not " that returns "cannot " is ok.

Thanks so much.

Jim




------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/