KP_SoCal
Board Regular
- Joined
- Nov 17, 2009
- Messages
- 116
In column A, I have a string within a cell with an alpha-numeric constant of 1A23 at the beginning and 432A1 at the end. In between could be any number of alpha-numeric characters. In column B, I need a formula that will extract the variable from the middle of these two constants in column A. The reason why I can't use the mid, left, or right functions is because the lenght of the variable could change from cell to cell.
-examle-
A1: 1A23abcd4A321
A2: 1A23abcdefg4A321
A3: 1A23ab4A321
A4: 1A23abcde4A321
B1: abcd
B2: abcdefg
B3: ab
B4: abcde
If possible I'd like to accomplish this without the use of VBA by strictly taking advantage of excel's built-in formula functions (if possible). However, if someone knows how to write this in vba, I'd be grateful to see how as well.
-examle-
A1: 1A23abcd4A321
A2: 1A23abcdefg4A321
A3: 1A23ab4A321
A4: 1A23abcde4A321
B1: abcd
B2: abcdefg
B3: ab
B4: abcde
If possible I'd like to accomplish this without the use of VBA by strictly taking advantage of excel's built-in formula functions (if possible). However, if someone knows how to write this in vba, I'd be grateful to see how as well.

Last edited: