Link to home
Start Free TrialLog in
Avatar of Andreas Hermle
Andreas HermleFlag for Germany

asked on

Extract first 12 digits from a string where applicable

Dear Experts I got the following data table and would like to insert a formula in Column B

User generated image
The formula in B2:B14 checks whether the string begins with a number, if so, then extracts the first 12 digits, else do nothing

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try
=IF(ISNUMBER(--LEFT(C2,1)),LEFT(C2,12),"")

Open in new window

Regards
SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andreas Hermle

ASKER

Wow, I am impressed, both codes work just fine. I suggest splitting the points if you do not mind.

Thank you very much for your professional help.

Regards, Andreas