I have the following code, which i want to output on the worksheet, instead of the immediate window. Can someone help me with this?
Sub Fly()
Dim r As Integer
Dim c As Integer
Dim Number As Single
Number = 10002
ReDim Flylist(1 To Number, 1 To 3) As String
For r = 1 To Number
For c = 1 To 3
Flylist(r, c) = Cells(r + 1, c)
Next c
Next r
For r = 1 To Number
For c = 1 To 3
If ((Cells(r + 1, 1) = "Luxembourg") Or (Cells(r + 1, 1) = "Warsaw") Or (Cells(r + 1, 1) = "Chicago")) _
And ((Cells(r + 1, 2) = "Dusseldorf") Or (Cells(r + 1, 2) = "Faroe Islands")) Then 'Husk paranteser, i dette tilfælde dobbelt!
Debug.Print Flylist(r, c)
End If
Next c
Next r
End Sub
This is the outut of the debug.print:
Chicago
Faroe Islands
DN3463
Warsaw
Faroe Islands
BC3497
Luxembourg
Faroe Islands
BF6959
Chicago
Dusseldorf
HK9783
Warsaw
Dusseldorf
VC1015