Lookup the help for "left" and "mid".
firstTen_A = Left(str, 10) should give you the first ten chars ...
if ( mid(str, 4, 1) = "P" ) then ... will allow you to check the 4th char.
Not used VB/VBA much recently and the syntax may be incorrect. Read the
help.