Skip to main content

IBAN Validation

This function will return a 1 if the IBAN adheres to the validation else it will return 0 if it is false.

The International Bank Account Number (IBAN) is an internationally agreed means of identifying bank accounts across national borders with a reduced risk of propagating transcription errors.

An IBAN is validated by converting it into an integer and performing a basic mod-97 operation (as described in ISO 7064) on it. If the IBAN is valid, the remainder equals 1.

I have tested this against the examples listed on the source page but it has not been extensively tested.  So if anyone uses this and finds problems, or can validate that it works properly I would appreciate a comment.

Source: http://en.wikipedia.org/wiki/International_Bank_Account_Number

March 17, 2015 - Updated the custom function so it can now handle IBANs that are longer than 30 characters.

Brian Element Fri, 12/09/2016 - 11:19

In reply to by MagiBzh

Not a problem, that gave me a hint.  Actually I think i figured out what the problem is.  Seems like when you export it changes the $ to amp& which is the html code for it.  I need to experiment a bit more to fix this but at least I know what I am looking for now.

Thanks

Brian Element Sat, 12/10/2016 - 08:06

In reply to by MagiBzh

Hi Magi,

Been looking at this a bit more.  It looks like the problem is with the way IDEA saves the file in which it changes the & to & which is how html would translate it.  My guess is that because you are using unicode it isn't doing the translation properly.

I don't have access to the unicode version so I can't test this out.  If you can open up the code in IDEA through the Custom Functions menu in the Equation Editor and change all the &amp; to & and the &lt;&gt; to <> hopefully that will get it working for you.

Good luck.

Brian

MagiBzh Mon, 12/19/2016 - 03:49

Hi Brian,
Thank you for the precision, it worked :D
Br,
MagiBzh