VBA - Return position of text string from within a cell
Posted by JAF on June 07, 2001 5:04 AM
Hiya
I need to genreate a variable which will give me the starting position of a text string (in this case "MC") within a larger text string in a cell.
Example: Cell A1 contains the following text:
MR A & MRS B MCNULTY
Using Excel's FIND function, returns the (correct) value of 14 - the text string of "MC" begins at the 14th character in cell A1.
I've tried to replicate this worksheet function in VBA, but can't get it to work.
I'm sure this is one of those instances of me missing the blindingly obvious, but I'm really stuck on this one!!
Any help gratefully received!