Sub Import_Removal_Data()
Dim wb As Workbook
Dim path As String
Dim x, y As Integer
Dim temp1 As String
Dim temp2 As String
Dim id, ac As Integer
Application.ScreenUpdating = False
path = "D:\Documents and Settings\xiae1703\Desktop\Backup\Project\"
Set wb = Workbooks.Open(path & "Fleet Hours and Cycles.xls", True, True)
'x is the source row
x = 2
'y is the main data sheet row
y = 2
temp1 = Worksheets(1).Cells(x, 1).Value
temp2 = Worksheets(1).Cells(x, 4).Value
c = 0
Do
If temp1 <> "" Then
'Sets cells in main workbook equal to cells in other data workbook
id = Worksheets(1).Cells(x, 1).Value
wb.Activate
Worksheets(1).Select
Cells(y, 1).Select
Cells(y, 1) = id
thisworkbook.Worksheets(1).Cells(y, 1) = wb.Worksheets(1).Cells(x, 1)
thisworkbook.Worksheets(1).Cells(y, 2) = wb.Worksheets(1).Cells(x, 2)
y = y + 1
End If
x = x + 1
temp1 = thisworkbook.Worksheets(1).Cells(x, 1).Value
temp2 = thisworkbook.Worksheets(1).Cells(x, 4).Value
If temp2 = "" Then
c = c + 1
Else
c = 0
End If
Loop Until c = 5
wb.Close False
Set wb = Nothing
Application.ScreenUpdating = True
End Sub