VBA u Excel-u
Paziti, VBA se zaglavi ako su veliki brojevi u pitanju!
Private Sub CommandButton1_Click()
Dim partijar As Long
Dim partijae As Integer
Dim redr As Integer
Dim rede As Integer
For rede = 300 To 500
For redr = 3 To 30000
‘ referenca celije je PRVO red, DRUGO kolona
partijae = Worksheets(“Sheet1”).Cells(rede, 17)
partijar = Worksheets(“Sheet1”).Cells(redr, 2)
‘ If partijae = partijar Then MsgBox “Partija iz e i partija iz R su ISTE” & partijae & ” i red u r je ” & redr
If partijae = partijar Then Worksheets(“Sheet1”).Cells(rede, 10) = “ISTOkaoUr”
Next redr
Next rede
End Sub