I
ILIMDAR
Всем здравствуйте. Нужна помощь. как сделать поиск по двум датам
With Baza.Spreadsheet1.Sheets("ProdajaK")
e = 2
r = 1
Do While .Cells(e, 1) > ""
If DTPicker1 = .Cells(e, 2) Or DTPicker2 = .Cells(e, 2) Then
r = r + 1
Spreadsheet1.Sheets("Sheet1").Cells(r, 1) = .Cells(e, 2) 'Text2.Text
Spreadsheet1.Sheets("Sheet1").Cells(r, 2) = .Cells(e, 1) 'Text2.Text
Spreadsheet1.Sheets("Sheet1").Cells(r, 3) = .Cells(e, 3) 'Text3.Text
Spreadsheet1.Sheets("Sheet1").Cells(r, 4) = .Cells(e, 4) 'Text3.Text
End If
e = e + 1
Loop
End With
With Baza.Spreadsheet1.Sheets("ProdajaK")
e = 2
r = 1
Do While .Cells(e, 1) > ""
If DTPicker1 = .Cells(e, 2) Or DTPicker2 = .Cells(e, 2) Then
r = r + 1
Spreadsheet1.Sheets("Sheet1").Cells(r, 1) = .Cells(e, 2) 'Text2.Text
Spreadsheet1.Sheets("Sheet1").Cells(r, 2) = .Cells(e, 1) 'Text2.Text
Spreadsheet1.Sheets("Sheet1").Cells(r, 3) = .Cells(e, 3) 'Text3.Text
Spreadsheet1.Sheets("Sheet1").Cells(r, 4) = .Cells(e, 4) 'Text3.Text
End If
e = e + 1
Loop
End With