Hi,
I'm trying to repeat an action which I think requires a "Do Until" loop but I'm not entirely sure if it does and I have no idea how to loop! So any help would be greatly appreciated!
My current code is:
Sub Quarter()
'
' Macro1 Macro
'
'
If Range("A1") > 0 Then
Sheets("Flights").Select
Range("Revenue").Select
Selection.Copy
Sheets("Rows Linked to Flights").Select
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If Range("A1").Value = "" Then Range("B1") = ""
End If
If Range("A2") > 0 Then
Sheets("Flights").Select
Range("Revenue").Select
Selection.Copy
Sheets("Rows Linked to Flights").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If Range("A2").Value = "" Then Range("B2") = ""
End If
If Range("A3") > 0 Then
Sheets("Flights").Select
Range("Revenue").Select
Selection.Copy
Sheets("Rows Linked to Flights").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If Range("A3").Value = "" Then Range("B3") = ""
End If
I want it to go down to row 200 but unsure how to go about it?
Any help would be greatly appreciated!
I'm trying to repeat an action which I think requires a "Do Until" loop but I'm not entirely sure if it does and I have no idea how to loop! So any help would be greatly appreciated!
My current code is:
Sub Quarter()
'
' Macro1 Macro
'
'
If Range("A1") > 0 Then
Sheets("Flights").Select
Range("Revenue").Select
Selection.Copy
Sheets("Rows Linked to Flights").Select
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If Range("A1").Value = "" Then Range("B1") = ""
End If
If Range("A2") > 0 Then
Sheets("Flights").Select
Range("Revenue").Select
Selection.Copy
Sheets("Rows Linked to Flights").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If Range("A2").Value = "" Then Range("B2") = ""
End If
If Range("A3") > 0 Then
Sheets("Flights").Select
Range("Revenue").Select
Selection.Copy
Sheets("Rows Linked to Flights").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
If Range("A3").Value = "" Then Range("B3") = ""
End If
I want it to go down to row 200 but unsure how to go about it?
Any help would be greatly appreciated!