Or this array formula
Formula: copy to clipboard
=MID(A1,1,MATCH(TRUE,ISERROR(1*MID(A1,ROW(INDIRECT("1:25")),1)),0)-1)*1


This being said, the solution for this type of problem is all over the Net...