
Originally Posted by
Aussiebear
@ snb, Can we do this as a formula first please?
Can you elaborate why ?
I thought: if the result matches your expectation why doing it otherwise ?
It has to be done only once, so it's no use recalculating all those formulae over and over again.
A. In the form of a UDF:
Function F_snb(c00, c01)
If Len(c00) > 6 Then y = Asc(Mid(c00, 7, 1)) - 96
F_snb = Replace(Left(c00, 6), "-", "") & 100 + y & 100 + InStr(" maiscarero", Left(LCase(c01), 2)) \ 2
End Function
In F1:
B. A 'normal' formula:
PHP Code:
=LEFT(SUBSTITUTE(A1;"-";"");5)&IFERROR(100+CODE(MID(A1;7;1))-96;100)&100+INT(FIND(LEFT(LOWER(C1);2);" maiscarero")/2)