Here is my code. "For rowCycle = 4" it's because I have double table header and indent from the border in one cell. The beginning of the required lines comes from the fourth line.
Sub ColumnsFind()
Dim ReqWorkbook1 As Workbook
Dim ReqWorkbook2 As Workbook
Set ReqWorkbook1 = Workbooks.Open("C:\Users\ignatevaeg\Excel\VBA\Book1.xlsx")
Set ReqWorkbook2 = Workbooks.Open("C:\Users\ignatevaeg\Excel\VBA\Book2.xlsx")
Dim rowCycle, secondCycle
secondCycle = 1
For rowCycle = 4 To ThisWorkbook.Sheets("Sales").Cells(Rows.Count, 1).End(xlUp).Row
If ThisWorkbook.Sheets("Sales").Range("AT" & rowCycle).NumberFormat = "dd-mm-yyy" And ThisWorkbook.Sheets("Sales").Range("AT" & rowCycle).Value <> "" And ThisWorkbook.Sheets("Sales").Range("AT" & rowCycle).Value <> "#Н/Д" Then
ReqWorkbook1.Sheets("Sales").Range("A" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("B" & rowCycle).Value
ReqWorkbook1.Sheets("Sales").Range("B" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("C" & rowCycle).Value
ReqWorkbook1.Sheets("Sales").Range("C" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("D" & rowCycle).Value
ReqWorkbook1.Sheets("Sales").Range("D" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("AT" & rowCycle).Value
ReqWorkbook1.Sheets("Sales").Range("E" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("AU" & rowCycle).Value
ReqWorkbook1.Sheets("Sales").Range("F" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("AV" & rowCycle).Value
secondCycle = secondCycle + 1
End If
Next rowCycle
For rowCycle = 4 To ThisWorkbook.Sheets("Sales").Cells(Rows.Count, 1).End(xlUp).Row
If ThisWorkbook.Sheets("Sales").Range("AN" & rowCycle).NumberFormat = "dd-mm-yyy" And ThisWorkbook.Sheets("Sales").Range("AN" & rowCycle).Value <> "" And ThisWorkbook.Sheets("Sales").Range("AN" & rowCycle).Value <> "#Н/Д" Then
ReqWorkbook2.Sheets("Sales").Range("A" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("B" & rowCycle).Value
ReqWorkbook2.Sheets("Sales").Range("B" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("C" & rowCycle).Value
ReqWorkbook2.Sheets("Sales").Range("C" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("D" & rowCycle).Value
ReqWorkbook2.Sheets("Sales").Range("D" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("AN" & rowCycle).Value
ReqWorkbook2.Sheets("Sales").Range("E" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("AO" & rowCycle).Value
ReqWorkbook2.Sheets("Sales").Range("F" & secondCycle).Value = ThisWorkbook.Sheets("Sales").Range("AP" & rowCycle).Value
secondCycle = secondCycle + 1
End If
Next rowCycle
End Sub
I tried this and got the "Type mismatch error" with the line 16 (If condition)
I don't know why, but when I decided to debug in "Watches" I see:
Why it is so, who knows?