Example 1) 1PMJ10-000334
Example 2) RMJ8-012565455
I need two formulas. One will output 1PMJ in example 1 or RMJ in example 2.

Second formula, I need it to output 10 in example 1 or 8 in example 2.

I am a beginner in excel. formulas are helpful. Any answers using VBA, please give full instruction(codes and what to type in the cell). Thanks.