Good day! In Excel, how can I change the full name and TIN to hash values ​​or to other unique values ​​using a macro?

    1 answer 1

    You can try something like this:

    Private Function EasyHash(ByRef Str$) As Long Dim i As Integer, Hash As Long For i = 1 To Len(Str) Hash = i + 1664525 * AscB(Mid(Str, i, 1)) + 1013904223 EasyHash = (Hash / i And 1048575) + EasyHash Next End Function 

    Difference:

    Alla | 2036555

    alla | 1090691

    baa | 2089824

    aab | 980141

    The original is http://www.excelworld.ru/forum/2-917-10187-16-1319802770