Bonjour,
J'ai un "logiciel" de facturation maison sur Excel. Pour l'introduction de la facture QR en Suisse, je suis en train de voir comment je peux créer la référence créancier structurée (ou référence du créancier RF). Ce qu'il me manque c'est de pourvoir générer le code de vérification à 2 chiffres qui suit RF.
Voici ce que j'ai trouvé sur le net :
Constructing an RF Creditor Reference and calculating check digits
The check digits consist of two numeric characters. The check digits are calculated for a reference by following the below steps:
Convert upper and lower case letters to digits according to the following conversion table:
A = 10 | G = 16 | M = 22 | S = 28 | Y = 34 |
B = 11 | H = 17 | N = 23 | T = 29 | Z = 35 |
C = 12 | I = 18 | O = 24 | U = 30 | |
D = 13 | J = 19 | P = 25 | V = 31 |
|
E = 14 | K = 20 | Q = 26 | W = 32 |
|
F = 15 | L = 21 | R = 27 | X = 33 |
|
Add the numeric value of the character RF, 2715, and ”00” to the right-hand end of the creditor reference;
Calculate modulo 97, i.e. the remainder of the division of the numeric character string “cccc...271500” by 97;
Subtract the remainder from 98 and, if the result is less than 10, insert a leading zero. The result is the two check digits. In order to correctly represent the complete RF Creditor Reference on an invoice, the code “RF” and the check digits should be inserted at the left-hand end of the creditor reference.
Examples of how to calculate the check digits
Example 1: A creditor reference is 2348236. The method to determine the check digits is the following:
Add to the right-hand end “2715” and “00”- the number becomes
2348236271500;
After dividing by 97, the remainder is 65;
Subtract the remainder from 98 - the result is 33.
The letters “RF” and the check digits “33” are inserted at the left-hand end of the creditor reference and the resulting RF Creditor Reference is
RF332348236 (electronic format) or
RF33 2348 236 (print format).
Je souhaite convertir mes références de factures en référence de créancier structurée :
Mes références de factures sont conçues de la façon suivante : 2009271234 (AA -année-MM-mois-JJ-jour-HH-heure-MM-minute).
Selon un générateur en ligne je devrai arriver au résultat suivant : RF342009271234
Est-ce qu'il y a un moyen de faire cela sur excel soit pas formule soit en vba ?
Je remercie par avance toute personne qui pourra m'apporter son aide.
Sandra