Fonction VBA : arrayDuplicates

La fonction VBA arrayDuplicates renvoie True si le tableau contient des doublons ou False s'il ne contient aucun doublon.

Utilisation :

arrayDuplicates(tableau)


Exemple d'utilisation

Vérification de la présence de doublons dans le tableau arrayDuplicates(tableau) :

Sub exemple()

    tableau = Array("GFH", "UIM", "QW", "DDFG", "ITW", "CV", "AQW", "OWM", "R", "QR", 55, "FFH", "", "OQD", "XD", "QAY", 23, "OI", "QQ", "OK")
    
    resultat = arrayDuplicates(tableau)
    
    MsgBox resultat

End Sub
excel vba array duplicates

Remarque : cette fonction nécessite l'installation du pack de fonctions XLP (un add-in gratuit pour Excel qui ajoute 92 nouvelles fonctions).