Hi All,
i need to link 3 of my macros together, so that it will run completely. how would i do that. below are the end and the beginning of the macros. thanks,
Code:
Range("A2").Select
ActiveCell.FormulaR1C1 = "=RC[1]&""/""&RC[2]"
Range("A2").AutoFill Destination:=Range("A2:A" & Cells(Rows.Count, "B").End(xlUp).Row)
Range("A2").Select
Selection.Copy
Sheets("Peak Cancellation Charges").Select
Range("A2").Select
ActiveSheet.Paste
Range("A2").AutoFill Destination:=Range("A2:A" & Cells(Rows.Count, "B").End(xlUp).Row)
Range("a65536").End(xlUp).Select
Selection.EntireRow.Delete
End Sub
Sub ContractUpdate2()
'
' ContractUpdate2 Macro
' Spacing
'
' Keyboard Shortcut: Ctrl+w
'
Sheets("Hotel Name Changes_1").Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
.
.
.
And this code goes on and ends with
.
.
.
Sheets("Peak Cancellation Charges").Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
ActiveWorkbook.Worksheets("Peak Cancellation Charges").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Peak Cancellation Charges").Sort.SortFields.Add Key _
:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Peak Cancellation Charges").Sort
.SetRange Range("A2:BB70000")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub ContractUpdate3()
'
' ContractUpdate3 Macro
' replace -1 to no show and use deleting for insert and Delete
'
' Keyboard Shortcut: Ctrl+e
'
Sheets("Cancellations_4").Select
Selection.AutoFilter
Range("E11").Select
Cells.Replace What:="-1", Replacement:="no show", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveSheet.Range("$A$1:$BB70000").AutoFilter Field:=5, Criteria1:="INSERT"
Range("S2").Select
i need to link 3 of my macros together, so that it will run completely. how would i do that. below are the end and the beginning of the macros. thanks,
Code:
Range("A2").Select
ActiveCell.FormulaR1C1 = "=RC[1]&""/""&RC[2]"
Range("A2").AutoFill Destination:=Range("A2:A" & Cells(Rows.Count, "B").End(xlUp).Row)
Range("A2").Select
Selection.Copy
Sheets("Peak Cancellation Charges").Select
Range("A2").Select
ActiveSheet.Paste
Range("A2").AutoFill Destination:=Range("A2:A" & Cells(Rows.Count, "B").End(xlUp).Row)
Range("a65536").End(xlUp).Select
Selection.EntireRow.Delete
End Sub
Sub ContractUpdate2()
'
' ContractUpdate2 Macro
' Spacing
'
' Keyboard Shortcut: Ctrl+w
'
Sheets("Hotel Name Changes_1").Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
.
.
.
And this code goes on and ends with
.
.
.
Sheets("Peak Cancellation Charges").Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
ActiveWorkbook.Worksheets("Peak Cancellation Charges").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Peak Cancellation Charges").Sort.SortFields.Add Key _
:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Peak Cancellation Charges").Sort
.SetRange Range("A2:BB70000")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub ContractUpdate3()
'
' ContractUpdate3 Macro
' replace -1 to no show and use deleting for insert and Delete
'
' Keyboard Shortcut: Ctrl+e
'
Sheets("Cancellations_4").Select
Selection.AutoFilter
Range("E11").Select
Cells.Replace What:="-1", Replacement:="no show", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveSheet.Range("$A$1:$BB70000").AutoFilter Field:=5, Criteria1:="INSERT"
Range("S2").Select