Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Adding_New_Markets()
- Dim SKA_Country_Column As Integer, Y_N_Column As Integer, Last_Tracker_Column As Integer, _
- CurrentRow As Integer, Last_Open_Row As Integer, Last_Tracker_Row As Integer, New_Market_Tracker As Range
- SKA_Country_Column = 1
- Y_N_Column = 2
- Last_Tracker_Column = ThisWorkbook.Worksheets("Markets to Open").UsedRange.Columns.Count
- Last_Open_Row = ThisWorkbook.Worksheets("Markets to Open").UsedRange.Rows.Count
- Last_Tracker_Row = ThisWorkbook.Worksheets("Market Tracker").UsedRange.Rows.Count
- Set New_Market_Tracker = ThisWorkbook.Worksheets("Market Tracker Template").Range("A1:T1")
- Do While SKA_Country_Column <= Last_Tracker_Column
- If ThisWorkbook.Worksheets("Markets to Open").Cells(1, SKA_Country_Column).Value = "SKA" Then
- New_Market_Tracker.Copy Sheet6.Range("A1").Offset(Last_Tracker_Row, 0)
- End If
- Do While Y_N_Column <= Last_Open_Row
- With ThisWorkbook.Worksheets("Markets to Open")
- If .Cells(1, Y_N_Column).Value = "Yes" Then
- Sheet6.Cells(Last_Tracker_Row + 1, 1).Value = .Cells(1, Y_N_Column - 1).Value
- End If
- End With
- Y_N_Column = Y_N_Column + 1
- Loop
- SKA_Country_Column = SKA_Country_Column + 1
- Last_Tracker_Row = Last_Tracker_Row + 1
- Loop
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement