Aşağıdaki kodda FATURA sayfısındaki E sütununa göre ARŞİV sayfasında kontrol yapılıyor.
E sütunu değilde, B ve F sütununa göre ARŞİV sayfasından kontrolü yapılsın istiyorum.
..................
Dim sh As Worksheet, k As Range, i As Long
Sheets("FATURA").Select
Set sh = Sheets("ARŞİV")
For i = 3 To 502
If Cells(i, "E").Value = "" Then GoTo atla
Set k = sh.Range("E:E").Find(Cells(i, "E").Value, , xlValues, xlWhole)
If Not k Is Nothing Then
Cells(i, "E").Select
MsgBox Cells(i, "E").Value & vbLf & "Bu Fatura daha önce arşivlenmiş. Kaydedilmedi!"
Exit Sub
GoTo atla
End If
atla:
Next i
...........................
E sütunu değilde, B ve F sütununa göre ARŞİV sayfasından kontrolü yapılsın istiyorum.
..................
Dim sh As Worksheet, k As Range, i As Long
Sheets("FATURA").Select
Set sh = Sheets("ARŞİV")
For i = 3 To 502
If Cells(i, "E").Value = "" Then GoTo atla
Set k = sh.Range("E:E").Find(Cells(i, "E").Value, , xlValues, xlWhole)
If Not k Is Nothing Then
Cells(i, "E").Select
MsgBox Cells(i, "E").Value & vbLf & "Bu Fatura daha önce arşivlenmiş. Kaydedilmedi!"
Exit Sub
GoTo atla
End If
atla:
Next i
...........................
