Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find cells containing multiple values in random order
Hello,
I'm using the find function to search for a single cell containing multiple predefined words. For example all cells containing the letter A and B, using the following code: Set X = Selection.Find(what:="A" & "*" & "B") But this search only finds cells that conatin A and B in that particular order. Thus a cell containing BA is not found! Is there a way to adapt the find statement in such a way the order of the words in a cell are no longer dependent on the search result? thanks in advance, Lucas van Rijsewijk Deurne, The Netherlands |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find cells containing multiple values in random order
Sub lucas()
Set X = Selection.Find(what:="A" & "*" & "B") Set Y = Selection.Find(what:="B" & "*" & "A") Set X = Union(X, Y) End Sub -- Gary''s Student - gsnu200799 "Lucas" wrote: Hello, I'm using the find function to search for a single cell containing multiple predefined words. For example all cells containing the letter A and B, using the following code: Set X = Selection.Find(what:="A" & "*" & "B") But this search only finds cells that conatin A and B in that particular order. Thus a cell containing BA is not found! Is there a way to adapt the find statement in such a way the order of the words in a cell are no longer dependent on the search result? thanks in advance, Lucas van Rijsewijk Deurne, The Netherlands |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find cells containing multiple values in random order
Thanks you for your quick solution! Very much appreciated!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
rearrange cells in random order | Excel Discussion (Misc queries) | |||
is it possible for excel to take several cells in random order and | Excel Discussion (Misc queries) | |||
find values in multiple cells and paste row values | Excel Discussion (Misc queries) | |||
How can I sort a selection of cells into random order? | Excel Discussion (Misc queries) | |||
Find values from cells in multiple sheets | Excel Worksheet Functions |