다음은 매크로 기반 솔루션입니다.
첫 번째 부분은 열 B을 6 자리가 아닌 값으로 채 웁니다.
두 번째 부분은 열 에서 중복을 해결 A I이 여기에 도움이 될 것 같아요
Sub SecretCoder()
Dim col As Collection, i As Long, N As Long, _
j As Long, v As String, codee As String, _
ncodee As Long, wf As WorksheetFunction
Set col = New Collection
Set wf = Application.WorksheetFunction
N = Cells(Rows.Count, "A").End(xlUp).Row
i = 1
'First Part
On Error Resume Next
While col.Count < N
DoEvents
ncodee = wf.RandBetween(100000, 999999)
col.Add ncodee, CStr(ncodee)
If Err.Number = 0 Then
Cells(i, 2).Value = ncodee
i = i + 1
Else
Err.Number = 0
End If
Wend
On Error GoTo 0
'Second Part
For i = 2 To N
v = Cells(i, 1).Text
For j = 1 To i - 1
If v = Cells(j, 1).Value Then
Cells(i, 2).Value = Cells(j, 2).Value
GoTo donV
End If
Next j
donV:
Next i
End Sub
: http://stackoverflow.com/questions/15201297/md5-hash-function-in-excel-without-using -vba – Elisha
6 자리 코드가 일정해야합니까? 즉, 중복 검사를하는 난수이면 충분합니까? – Bathsheba