Forum Discussion
excel_learner
Jul 08, 2022Brass Contributor
Using Left Function with If statement
I am using the Left function to get first two letters of a Postal Code, however in some of the postal codes the first two characters contains a number. How can I ignore the number in the postal codes...
- Jul 08, 2022
HansVogelaar
Jul 08, 2022MVP
With a postal code in A1:
=LEFT(A1,MATCH(TRUE,CODE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))<=57,0)-1)
If you don't have Microsoft 365 or Office 2021, you'll probably have to confirm the formula with Ctrl+Shift+Enter.
Fill down.