I've been emailed a couple of improvements to the NPV solution. To overcome an issue with precision (eg the initial NPV solution gives "45678XX" --> 45678.0000000001) this is better:
Code:
=ROUND(NPV(-0.9,,IFERROR(MID(A1,1+LEN(A1)-ROW(OFFSET(A$1,,,LEN(A1))),1)%,"")),0)
In the interest of compactness, this will help:
Code:
=ROUND(NPV(-0.9,,IFERROR(MID(A1,1+LEN(A1)-ROW(A:A),1)%,"")),0)