vuoi proprio una macro o ti basta un:

=STRINGA.ESTRAI(A1;1;6)