Search for multiple words

O

ogopogo5

I’m trying to write a sub-routine where it will search multiple words.
I.E. it looks for a word “nails” and if it can’t find it then it will
search the next word “plywood”. It finds this word, copy the row and
columns to another part of the spread sheet and then it carries on
searching for the next word.



*** Sent via Developersdex http://www.developersdex.com ***
 
O

Otto Moehrbach

Do you mean that the subroutine will search FOR those words? Where are
these words? Are they in some column or row or are they words that you
enter into some cell and you want the search to happen when you enter each
word? What is the layout of the range in which it will search for those
words? Do you want the search to look for the word in cells that contain
other words as well or do the cells contain just the word being searched
for? You say "copy the row and columns...", what columns? Be more specific
about what you have, the layout of it, where this is, where that is, what to
copy, where to paste it, etc. HTH Otto
 
O

ogopogo5

Hi Otto
Thank you for repling back. All the words will be in "B" column from B50
to B850. Once it finds the word, I would like it to copy that single row
from column A to column Q to column "AA1". The word may appear couple of
times in "B" column so it will have to copy the next row at column "AA
2"



*** Sent via Developersdex http://www.developersdex.com ***
 
O

Otto Moehrbach

What range do you want to search? And you didn't answer my question about
the search word being alone in a cell in the search range or the search word
being a part of more text in the search range. In other words, say we are
searching for "Blue". Do you want to search for a cell that contains ONLY
"Blue" or do you want to search for a cell that has "Blue" as a PART of what
is in the cell? HTH Otto
 
Top