Hi all, I am trying to use a Left formula to extract the first several characters of a variable string. A few examples of these values will be:

20B1
20B2
20B3
21B1
21D2
21D43
101B1
101B2
101D3

I want to determine the numbers preceding the first letter (only the letters "B" and "D" are used) but number of preceding characters varies.

Assuming my data is in A column, I am trying to use something like this formula: =LEFT(A1,FIND("B",A1)-1) to return the numbers before the "B" (e.g. "20", "21", and "101").

This works perfectly, except for the fact that my cell values contain both the letter "B" AND the letter "D" and I need to find the values for all cells.

Is there any way of doing something like =LEFT(A1,FIND("B" or "D",A1)-1) or something that could return the numbers preceding the first alphabetical character...?

Thanks!