Sub Import_Removal_Data()
Dim wb As Workbook
Dim path As String
Dim x, y As Integer
Dim temp1, temp2 As Variant
Application.ScreenUpdating = False
path = "D:\Documents and Settings\xiae1703\Desktop\Project\"
Set wb = Workbooks.Open(path & "Fleet Hours and Cycles.xls", True, True)
'x is the source row
'y is the main data sheet row where it will be inputed
x = 2
y = 1
With thisworkbook.Worksheets(1)
temp1 = Worksheets(1).Cells(x, 1).Value
temp2 = Worksheets(1).Cells(x, 4).Value
c = 0
While c < 5
If temp1 <> "" Then
'Sets cells in main workbook equal to cells in other data workbook
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
If temp2 = "" Then
c = c + 1
Else
c = 0
End If
If c > 5 Then wb.Worksheets(1).Activate
Wend
End With
wb.Close False
Set wb = Nothing
Application.ScreenUpdating = True
End Sub