Hi,
I have a column with address details. I would like to separate the house number (always on the left) from the string. In some case, there might not be a house number, while in some other cases there might be a house and a flat number. I am only looking for the house number.
Table below, shows some sample data and the extracted columns I would like to have.
I have tried the following but I am not getting the intended results. Somehow it is pulling some letters as well.
<tbody>
</tbody>
Thank you for any help.
I have a column with address details. I would like to separate the house number (always on the left) from the string. In some case, there might not be a house number, while in some other cases there might be a house and a flat number. I am only looking for the house number.
Table below, shows some sample data and the extracted columns I would like to have.
I have tried the following but I am not getting the intended results. Somehow it is pulling some letters as well.
Code:
=LEFT(S2,SUM(LEN(S2)-LEN(SUBSTITUTE(S2,{"0","1","2","3","4","5","6","7","8","9"},""))))
Sample Data | House # | Address |
123 Main Street | 123 | Main Street |
7 Jones Blvd | 7 | Jones Blvd |
Super St | Super St | |
Market Road Flat 2 | Market Road Flat 2 | |
4567 Elm St #7 | 4567 | Elm St #7 |
<tbody>
</tbody>
Thank you for any help.