
Function Hamming(rng1 As Range, rng2 As Range)
Dim i As Integer
For i = 1 To rng1.Cells.Count
If rng1.Cells(1, i) <> rng1.Cells(2, i) Then
Hamming = Hamming + 1
End If
Next i
End Function |
Function Hamming(rng1 As Range, rng2 As Range)
Dim i As Integer
For i = 1 To rng1.Cells.Count
If rng1.Cells(1, i) <> rng2.Cells(1, i) Then
Hamming = Hamming + 1
End If
Next i
End Function |
Dim k As Integer
Dim LoopCol As Integer
Dim LoopRig As Integer
k = Cells(3, 2)
For LoopCol = 1 To 10
For LoopRig = 1 To 10
If LoopRig <> k Then
If Cells(LoopRig + 6, LoopCol + 3) = Cells(k + 6, LoopCol + 3) Then
Cells(LoopRig + 6, LoopCol + 14) = 0
ElseIf Cells(LoopRig + 6, LoopCol + 3) <> Cells(k + 6, LoopCol + 3) Then
Cells(LoopRig + 6, LoopCol + 14) = 1
End If
ElseIf LoopRig = k Then
End If
Next LoopRig
Next LoopCol
End Sub |
