- Sub schedule()
- Dim i As Integer
- Dim j As Integer
- Dim l As Integer
-
- j = Worksheets("PARKER SHIPMENT").Range("A" & Worksheets("PARKER SHIPMENT").Rows.Count).End(xlUp).Row
- l = 13
- If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:C"), 3, False)) Then
- Worksheets("²î´Áªí").Range("B1").Value = ""
- Else
- Worksheets("²î´Áªí").Range("B1").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:C"), 3, False)
- End If
-
- If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:D"), 4, False)) Then
- Worksheets("²î´Áªí").Range("B2").Value = ""
- Else
- Worksheets("²î´Áªí").Range("B2").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:D"), 4, False)
- End If
-
- If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:E"), 5, False)) Then
- Worksheets("²î´Áªí").Range("E8").Value = ""
- Else
- Worksheets("²î´Áªí").Range("E8").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:E"), 5, False)
- End If
-
- If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:G"), 7, False)) Then
- Worksheets("²î´Áªí").Range("L8").Value = ""
- Else
- Worksheets("²î´Áªí").Range("L8").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:G"), 7, False)
- End If
-
-
-
- For i = 2 To j
-
- If Worksheets("PARKER SHIPMENT").Cells(i, 4).Value = Worksheets("²î´Áªí").Range("B1").Value Then
- Worksheets("²î´Áªí").Cells(l, 3).Value = Worksheets("PARKER SHIPMENT").Cells(i, 2).Value
- Worksheets("²î´Áªí").Cells(l, 4).Value = Worksheets("PARKER SHIPMENT").Cells(i, 1).Value
- Worksheets("²î´Áªí").Cells(l, 6).Value = Worksheets("PARKER SHIPMENT").Cells(i, 7).Value
- Worksheets("²î´Áªí").Cells(l, 7).Value = Worksheets("PARKER SHIPMENT").Cells(i, 9).Value
- Worksheets("²î´Áªí").Cells(l, 8).Value = Worksheets("PARKER SHIPMENT").Cells(i, 11).Value
- Worksheets("²î´Áªí").Cells(l, 9).Value = Worksheets("PARKER SHIPMENT").Cells(i, 12).Value
- Worksheets("²î´Áªí").Cells(l, 10).Value = Worksheets("PARKER SHIPMENT").Cells(i, 13).Value
- Worksheets("²î´Áªí").Cells(l, 11).Value = Worksheets("PARKER SHIPMENT").Cells(i, 14).Value
- Worksheets("²î´Áªí").Cells(l, 12).Value = Worksheets("PARKER SHIPMENT").Cells(i, 20).Value
- Worksheets("²î´Áªí").Cells(l, 13).Value = Worksheets("PARKER SHIPMENT").Cells(i, 21).Value
-
-
- If Worksheets("PARKER SHIPMENT").Cells(i, 19).Value = " " Then Worksheets("²î´Áªí").Cells(l, 5).Value = "¨S¦³"
- Else
- Worksheets("²î´Áªí").Cells(l, 5).Value = "¦³"
- End If
-
- If Worksheets("PARKER SHIPMENT").Cells(i, 27).Value <> " " And Worksheets("PARKER SHIPMENT").Cells(i, 28).Value > 0 And Worksheets("PARKER SHIPMENT").Cells(i, 28).Value <> " " Then
- Worksheets("²î´Áªí").Cells(l, 14).Value = "¤w¥I´Ú"
- Else
- Worksheets("²î´Áªí").Cells(l, 14).Value = " "
- End If
-
- l = l + 1
-
-
- Next i
-
- End Sub
½Æ»s¥N½X ¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ýþ¸Ì¥X²{°ÝÃD¡H |