Results 1 to 15 of 15

Thread: Creating an 11 digit number

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    snb
    Guest
    Quote Originally Posted by Aussiebear View Post
    @ 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:

    PHP Code:
    =F_snb(A1,C1
    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
    Last edited by snb; 10-29-2020 at 09:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •