Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Solver()
- Row = 7
- Col = 2
- MinVal = 99999
- MinI = MinVal
- MinJ = MinVal
- MinK = MinVal
- For i = 700 To 900
- Cells(Row, Col) = i
- If Int(Cells(6, 2)) = Cells(6, 2) And Cells(5, 2) <= Cells(4, 2) Then
- For j = 200 To 300
- Cells(Row, Col + 1) = j
- If Int(Cells(6, 3)) = Cells(6, 3) And Cells(5, 3) <= Cells(4, 3) Then
- For k = 1000 To 1300
- Cells(Row, Col + 2) = k
- Value = Cells(7, 6)
- If Int(Cells(6, 4)) = Cells(6, 4) And Cells(5, 6) = Cells(5, 8) And Cells(6, 6) <= Cells(6, 8) And Cells(5, 4) <= Cells(4, 4) And Value < MinVal Then
- Debug.Print "Yay!"
- MinVal = Value
- MinI = i
- MinJ = j
- MinK = k
- End If
- Next k
- End If
- Next j
- End If
- Next i
- Cells(Row, Col) = MinI
- Cells(Row, Col + 1) = MinJ
- Cells(Row, Col + 2) = MinK
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement