Hi
I have a few sample strings like bellow:
1: "in-Training and Development Officer Pakistan"
2: "Training and Development Officer Pakistan-in"
3: "Training and Development Officer in-Pakistan"
4: "Training and Development Officer in Pakistan"
remember these are the samples
What I would like to get is the word "in" in the major string
If I use instr or instrRev functions they pic in that is in "training"
What my logic is (You may have your own which I would like to know also) if the character on the right other than the substring and left of that substring other than the substring is non alpha then that is my word.else not
like ain ,in is not myword as it has alpha character on the left
like inin ,in is also not my word as it also have a alpha on the right
but " in-" , here in is my word
How can I pass the main string from this logic in VBA
Help would be greatly appreciated
Best Regards
Imran Bhatti
Hope that makes sense.
Imran Bhatti
Bookmarks