iki excel sayfasındaki 3 . sütunda bulanan bilgileri karşılaştıracağız ve 1. sayfada olmayıp 2. sayfada olan veriyi 1.sayfaya 3.sütunun boş olan hücresine yazılacak. yardım edermisin.
x = 7
While ThisWorkbook.Sheets(TextBox22.Text).Cells(x, 2) <> ""
y = 7
While ThisWorkbook.Sheets("ORT").Cells(y, 2) <> ""
If ThisWorkbook.Sheets(TextBox22.Text).Cells(x, 4).Value = ThisWorkbook.Sheets("ORT").Cells(y, 4) And ThisWorkbook.Sheets(TextBox22.Text).Cells(x, 5).Value = ThisWorkbook.Sheets("ORT").Cells(y, 5) Then
y = y + 1
Else
For r = 7 To 1000
If ThisWorkbook.Sheets("ORT").Cells(r, 3) = "" Then
ThisWorkbook.Sheets("ORT").Cells(r, 2).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 2).Value
ThisWorkbook.Sheets("ORT").Cells(r, 3).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 3).Value
ThisWorkbook.Sheets("ORT").Cells(r, 4).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 4).Value
ThisWorkbook.Sheets("ORT").Cells(r, 5).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 5).Value
ThisWorkbook.Sheets("ORT").Cells(r, 6).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 9).Value
End If
GoTo deger
Next r
End If
Wend
deger:
x = x + 1
Wend
x = 7
While ThisWorkbook.Sheets(TextBox22.Text).Cells(x, 2) <> ""
y = 7
While ThisWorkbook.Sheets("ORT").Cells(y, 2) <> ""
If ThisWorkbook.Sheets(TextBox22.Text).Cells(x, 4).Value = ThisWorkbook.Sheets("ORT").Cells(y, 4) And ThisWorkbook.Sheets(TextBox22.Text).Cells(x, 5).Value = ThisWorkbook.Sheets("ORT").Cells(y, 5) Then
y = y + 1
Else
For r = 7 To 1000
If ThisWorkbook.Sheets("ORT").Cells(r, 3) = "" Then
ThisWorkbook.Sheets("ORT").Cells(r, 2).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 2).Value
ThisWorkbook.Sheets("ORT").Cells(r, 3).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 3).Value
ThisWorkbook.Sheets("ORT").Cells(r, 4).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 4).Value
ThisWorkbook.Sheets("ORT").Cells(r, 5).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 5).Value
ThisWorkbook.Sheets("ORT").Cells(r, 6).Value = ThisWorkbook.Sheets(TextBox22.Text).Cells(y, 9).Value
End If
GoTo deger
Next r
End If
Wend
deger:
x = x + 1
Wend
