Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Elf Proef - Eleven test (Read 6693 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Elf Proef - Eleven test
30.12.07 at 11:41:02
Elf Proef - Eleven test
The eleven test is a test that can be used to validate Dutch bank account numbers. Although it is a rudimentary check it may be useful as a first attempt to validate the correctness of a bank number.
The attached spreadsheet contains the worksheet function in Excel to do the test. For your convenience, the code is printed below too.
Public Function ElfProef(BankrekeningNr As String) As String
    Dim lng As Long          'Loop variabele
    Dim lngResult As Long    'Tijdelijk resultaat
    lngResult = 0            'Initialisatie
    If Len(BankrekeningNr) = 9 Then
     For lng = 1 To 9
       lngResult = lngResult + (10 - lng) * Val(Mid(BankrekeningNr, lng, 1))
     Next lng
     If lngResult Mod 11 = 0 Then
       'Geen restwaarde na delen door 11
       ElfProef = "ok"
       'Er is een restwaarde na delen door 11
       ElfProef = "niet ok"
     End If
     ElfProef = "niet 9 cijferig"
    End If
End Function

Back to top
« Last Edit: 30.12.07 at 11:41:54 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1