1

Topic: In Excel as it is possible to replace the text with unique number or on values

Kind time of days! In Excel as it is possible to change field .. and an INN on  - values, or to other unique values by means of a macro?

2

Re: In Excel as it is possible to replace the text with unique number or on values

values are not unique values

3

Re: In Excel as it is possible to replace the text with unique number or on values

Ulukmyrza wrote:

Kind time of days! In Excel as it is possible to change field .. and an INN on  - values, or to other unique values by means of a macro?

What for?
CoCreateGuid to you in the help.

4

Re: In Excel as it is possible to replace the text with unique number or on values

Shocker. Pro;
To replace with Hesh - values, or on unique numbers.

5

Re: In Excel as it is possible to replace the text with unique number or on values

big-duke;
To hide the data.

6

Re: In Excel as it is possible to replace the text with unique number or on values

big-duke wrote:

it is passed...
What for?
CoCreateGuid to you in the help.

And if values repeat also it it is necessary to trace.?

7

Re: In Excel as it is possible to replace the text with unique number or on values

Scripting. Dictionary...

8

Re: In Excel as it is possible to replace the text with unique number or on values

i45;
And further that? HashVal? Values HashVal only one thousand with something, so it very nonunique.
Here quickly the code for search of 10 steams of lines with identical HashVal.

Sub Test_HashVal ()
Dim s $, h $, clS As New Collection, clH As New Collection, i&, j&
Dim di As Object: Set di = CreateObject ("scripting. Dictionary")
On Error Resume Next
Do
1 s = ""
For i = 3 To 3 + Int (Rnd * 8)
s = s AND Chr $ (65 + Int (Rnd * 26))
Next
clS.Add 0, s
If Err Then Err. Clear: GoTo 1
h = di. HashVal (s)
clH.Add s, h
If Err Then
Err. Clear
Debug. Print "an identical hash:"; h, "for lines"; s; "and"; clH (h)
j = j + 1
End If
Loop Until j = 10
End Sub

Approximate result

 the Identical hash: 892 for lines SMISZM and TBOLN
Identical hash: 531 for lines BJASMSL and ZKRO
Identical hash: 531 for lines BIRSVQ and ZKRO
Identical hash: 66 for lines BGAH and FM
Identical hash: 254 for lines NWXRYEH and QN
Identical hash: 139 for lines PMTCLJG and WCAMX
Identical hash: 73 for lines I and GC
Identical hash: 334 for lines UZ and MDJZQMC
Identical hash: 1091 for lines JKIYQH and FIBB
Identical hash: 262 for lines LGHOV and INIBQIA

9

Re: In Excel as it is possible to replace the text with unique number or on values

Here found

https://en.wikibooks.org/wiki/Visual_Basic_for_Applications/String_Hashing_in_VBA wrote:

The VBA code below generates the digests for the MD5, SHA1, SHA2-256, SHA2-384, and SHA2-512 hashes, for strings, in either of the hex or base-64 output formats

10

Re: In Excel as it is possible to replace the text with unique number or on values

https://msdn.microsoft.com/ru-ru/librar … p/bb759853 (v=vs.85).aspx