How do I remove the first and last number from a 5-digit number?

Occasional Contributor

So I know if I want to remove the last digit of a 5-digit number, I use the formula:

=LEFT(C2,4) C2 being the cell I am affecting.

In the case of the number 01234 being in cell C2, my formula would give me the first 4 digits only, or 0123.


Question: How do I remove the first digit and the last digit, so I just end up with 123?


Thank you!

4 Replies

@Danger_SF Try this:



best response confirmed by Danger_SF (Occasional Contributor)








Without any text function.




Another variant of @Detlef Lewin formula

=INT( MOD(A1,10000) / 10 )