tiehaze
asked on
How do I search column for text, and then execute something if it finds it #2
I just asked this question at https://www.experts-exchange.com/questions/22074669/How-do-I-search-column-for-text-and-then-execute-something-if-it-finds-it.html
This code is very foreign, and I can't figure out how to do an easier search (below).
I need to search column C for the # symbol. If it finds it, execute code A, if not, execute code B?
This code is very foreign, and I can't figure out how to do an easier search (below).
I need to search column C for the # symbol. If it finds it, execute code A, if not, execute code B?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I included "LookAt:=xlPart" into the .Find method, so that it looks for the # anywhere in the cell. If you want it to look for # being the ONLY character in the cell, change that to LookAt:=xlWhole
ASKER
Do you know how I can search for **? When I try with control find, it says almost every cell has it when it doesn't.
Sorry about the delay, holiday gift-exchange party here at work today.
Sure, you'll need to search for ~*~*
The * symbol is a wildcard meaning "anything", so thats why almost every cell has it. If you put the tilda (next to the 1 key) before it, like ~* it will do a literal search for the "*" symbol. For two, use ~*~*
Matt
Sure, you'll need to search for ~*~*
The * symbol is a wildcard meaning "anything", so thats why almost every cell has it. If you put the tilda (next to the 1 key) before it, like ~* it will do a literal search for the "*" symbol. For two, use ~*~*
Matt
The same would apply for the ? symbol, as that means "any one character". To find that you'd look for ~?
ASKER
thanks so much
Anytime.. this stays unlocked for 7 days so feel free to ask any more like that if you want
ASKER