I have a string in a cell:
EFGH are constants, and
xxxxx is of variable length.
How do I write an Excel formula to extract
migrated from stackoverflow.com Sep 22 '09 at 2:44
This question came from our site for professional and enthusiast programmers.
If you just want to brute force it (assuming ABCD and EFGH aren't within xxxxx then the following approach should work, although I would recommend you come up with a better method.
(Please excuse if my syntax is slightly off. It's been a while since I've been in VBScript.)
Assuming it is in Cell A1
If you wanted to check that the cell is correctly formed you could do: