this code finds 2 non hypotenuse sides that form a right angle triangle then checks if it is a multiple of a previous "find". it finds nothing after 65 72 97 ie it does not find 65 156 169.
J column is a list of prime numbers below 100
Sub Macro4()
'
' Macro4 Macro
' Macro recorded 13/08/2017 by bob
'
'
For j = 3 To 69
Cells(1, 8) = j
For k = j + 1 To 175
temp = j ^ 2 + k ^ 2: Cells(1, 4) = temp
temp1 = Sqr(temp): Cells(1, 5) = temp1
temp2 = Int(temp1): Cells(1, 6) = temp2
If temp2 = temp1 Then GoTo 100 Else GoTo 200
100 For z = 1 To 25
If Cells(z, 10) > k Then GoTo 150 Else GoTo 140
140 If j / Cells(z, 10) = Int(j / Cells(z, 10)) Then GoTo 142 Else GoTo 170
142 If k / Cells(z, 10) = Int(k / Cells(z, 10)) Then GoTo 144 Else GoTo 170
144 If temp / Cells(z, 10) = Int(temp / Cells(z, 10)) Then GoTo 200 Else GoTo 150
150 Sum = Sum + 1: Cells(Sum, 1) = j: Cells(Sum, 2) = k: GoTo 200
170 Next z
200 Next k
Next j
End Sub
J column is a list of prime numbers below 100
Sub Macro4()
'
' Macro4 Macro
' Macro recorded 13/08/2017 by bob
'
'
For j = 3 To 69
Cells(1, 8) = j
For k = j + 1 To 175
temp = j ^ 2 + k ^ 2: Cells(1, 4) = temp
temp1 = Sqr(temp): Cells(1, 5) = temp1
temp2 = Int(temp1): Cells(1, 6) = temp2
If temp2 = temp1 Then GoTo 100 Else GoTo 200
100 For z = 1 To 25
If Cells(z, 10) > k Then GoTo 150 Else GoTo 140
140 If j / Cells(z, 10) = Int(j / Cells(z, 10)) Then GoTo 142 Else GoTo 170
142 If k / Cells(z, 10) = Int(k / Cells(z, 10)) Then GoTo 144 Else GoTo 170
144 If temp / Cells(z, 10) = Int(temp / Cells(z, 10)) Then GoTo 200 Else GoTo 150
150 Sum = Sum + 1: Cells(Sum, 1) = j: Cells(Sum, 2) = k: GoTo 200
170 Next z
200 Next k
Next j
End Sub