ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ý­þ¸Ì¥X²{°ÝÃD¡H

¦^´_ 10# 198188
¬O¦³ªº
   .Range("D2:D" & LastRec).Value = .Range("AA2:AA" & LastRec).Value  &  .Range("AH2:AH" & LastRec).Value
¦p LastRec=10
    "D2:D" & LastRec      ->"D2:D10"
    "AA2:AA" & LastRec ->"AA2:AA10"
³o³£¬O³sÄò½d³ò:µLªk¥Î "="  ¨Ó­pºâ

TOP

¦^´_ 11# GBKEE




A                                   K                  L
POA325691              325691       YES
POA335625              325648       NO
ZRH325648               335625      YES

¦bBÄæset      vlookup(right(a2,6),k:L,2,False)ªº¤½¦¡¡A¦ý¥X¨Óªºµª®×¬O#N/A
­þ¸Ì¥X¿ù¤F¡H

TOP

¦^´_ 12# 198188
Âন¼Æ¦r
VLOOKUP(VALUE(RIGHT(A2,6)),K:L,2,FALSE)

TOP

¦^´_ 13# GBKEE


    ½Ð°ÝSUBSCRIPT OUT OF RANGE¬O­þ­Ó°ÝÃD¡H
  Set FRng = Wb.Sheets("­»´ä&®ü¨¾³æ").Range("A:A").Find(A, lookat:=xlWhole)

TOP

¦^´_  GBKEE

    ½Ð°ÝSUBSCRIPT OUT OF RANGE¬O­þ­Ó°ÝÃD¡H
  Set FRng = Wb.Sheets("­»´ä&®ü¨¾³æ"). ...
198188 µoªí©ó 2012/12/20 15:16

§A­n»¡¬O¥X¤F¤°»ò¿ù»~??

TOP

¦^´_ 15# GBKEE


   ¥X²{¤F¤U­±³o¥y¸Ü
SUBSCRIPT OUT OF RANGE

TOP

¦^´_ 16# 198188
SUBSCRIPT OUT OF RANGE->°}¦C¯Á¤Þ¶W¥X½d³ò (¿ù»~ 9)
Àˬd Set FRng = Wb.Sheets("­»´ä&®ü¨¾³æ").Range("A:A").Find(A, lookat:=xlWhole)
³oWb¬¡­¶Ã¯ ¬O§_¦³ ­»´ä&®ü¨¾³æ ³o¤u§@ªí

TOP

¦^´_ 17# GBKEE


    ½Ð°Ý¬O¤£¬O¤¤¤å¦W·|¸g±`¥X²{°ÝÃD¡H¦]¬°¥H«e³£¨S°ÝÃD¡A¦ý²{¦b¤~¥X²{°ÝÃD¡H

TOP

¦^´_  GBKEE


    ½Ð°Ý¬O¤£¬O¤¤¤å¦W·|¸g±`¥X²{°ÝÃD¡H¦]¬°¥H«e³£¨S°ÝÃD¡A¦ý²{¦b¤~¥X²{°ÝÃD¡H
198188 µoªí©ó 2012-12-21 18:09

¯d·N¤@¤U­¶¦Wªº& ·|¤£·|¥Î¤F¥þ§Î,  
¥þ§Î¡®©M¥b§Î& ¬O¤£¦Pªº
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

[µo°Ý] ¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ý­þ¸Ì¥X²{°ÝÃD¡H

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2012-12-26 16:41): ­n°»¿ùµ{¦¡½X¡A½Ðªþ¤WÀÉ®×

  1. Sub schedule()

  2.   Dim i As Integer
  3.   Dim j As Integer
  4.   Dim l As Integer
  5.   
  6.   j = Worksheets("PARKER SHIPMENT").Range("A" & Worksheets("PARKER SHIPMENT").Rows.Count).End(xlUp).Row
  7.   l = 13

  8. If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:C"), 3, False)) Then
  9. Worksheets("²î´Áªí").Range("B1").Value = ""
  10. Else
  11. Worksheets("²î´Áªí").Range("B1").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:C"), 3, False)
  12. End If
  13.   
  14. If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:D"), 4, False)) Then
  15. Worksheets("²î´Áªí").Range("B2").Value = ""
  16. Else
  17. Worksheets("²î´Áªí").Range("B2").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:D"), 4, False)
  18. End If
  19.   
  20. If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:E"), 5, False)) Then
  21. Worksheets("²î´Áªí").Range("E8").Value = ""
  22. Else
  23. Worksheets("²î´Áªí").Range("E8").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:E"), 5, False)
  24. End If
  25.   
  26. If IsError(Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:G"), 7, False)) Then
  27. Worksheets("²î´Áªí").Range("L8").Value = ""
  28. Else
  29. Worksheets("²î´Áªí").Range("L8").Value = Application.VLookup(Worksheets("²î´Áªí").Cells(1, 1).Value, Sheets("«È¤á¸ê®Æ").Range("A:G"), 7, False)
  30. End If

  31.   

  32.   For i = 2 To j
  33.   
  34.   If Worksheets("PARKER SHIPMENT").Cells(i, 4).Value = Worksheets("²î´Áªí").Range("B1").Value Then
  35.   Worksheets("²î´Áªí").Cells(l, 3).Value = Worksheets("PARKER SHIPMENT").Cells(i, 2).Value
  36.   Worksheets("²î´Áªí").Cells(l, 4).Value = Worksheets("PARKER SHIPMENT").Cells(i, 1).Value
  37.   Worksheets("²î´Áªí").Cells(l, 6).Value = Worksheets("PARKER SHIPMENT").Cells(i, 7).Value
  38.   Worksheets("²î´Áªí").Cells(l, 7).Value = Worksheets("PARKER SHIPMENT").Cells(i, 9).Value
  39.   Worksheets("²î´Áªí").Cells(l, 8).Value = Worksheets("PARKER SHIPMENT").Cells(i, 11).Value
  40.   Worksheets("²î´Áªí").Cells(l, 9).Value = Worksheets("PARKER SHIPMENT").Cells(i, 12).Value
  41.   Worksheets("²î´Áªí").Cells(l, 10).Value = Worksheets("PARKER SHIPMENT").Cells(i, 13).Value
  42.   Worksheets("²î´Áªí").Cells(l, 11).Value = Worksheets("PARKER SHIPMENT").Cells(i, 14).Value
  43.   Worksheets("²î´Áªí").Cells(l, 12).Value = Worksheets("PARKER SHIPMENT").Cells(i, 20).Value
  44.   Worksheets("²î´Áªí").Cells(l, 13).Value = Worksheets("PARKER SHIPMENT").Cells(i, 21).Value

  45.   
  46.   If Worksheets("PARKER SHIPMENT").Cells(i, 19).Value = " " Then Worksheets("²î´Áªí").Cells(l, 5).Value = "¨S¦³"
  47.   Else
  48.   Worksheets("²î´Áªí").Cells(l, 5).Value = "¦³"
  49.   End If
  50.    
  51.   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
  52.     Worksheets("²î´Áªí").Cells(l, 14).Value = "¤w¥I´Ú"
  53.     Else
  54.     Worksheets("²î´Áªí").Cells(l, 14).Value = " "
  55.   End If
  56.   
  57.   l = l + 1
  58.   
  59.   
  60.   Next i
  61.   
  62. End Sub
½Æ»s¥N½X
¥X²{RUN-TIME ERROR '9': SUBSCRIPT OUT OF RANGE,½Ð°Ý­þ¸Ì¥X²{°ÝÃD¡H

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD