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

2 ­Ó ON ERROR GOTO ERROR ¥X²{¿ù»~

­Ó¤H«ØijÀ³ºÉ¥i¯à¤£¨Ï¥Î On Error..
  1. Sub crosscheck_new_item()
  2. Application.Calculation = xlCalculationManual
  3. Dim i As Long
  4. On Error Resume Next
  5. Worksheets("2019 TRADING SOC NO.").Select
  6. If Err Then Err.Clear: GoTo error1
  7. For i = 2 To Range("A" & Rows.Count).End(xlUp).Row
  8.     Worksheets("2019 TRADING SOC NO.").Range("L" & i).Value = WorksheetFunction.VLookup(Worksheets("2019 TRADING SOC NO.").Range("E" & i).Value, Worksheets("¦¨¥» (2020.09.28)").Range("D:AL"), 35, 0)
  9.     Worksheets("2019 TRADING SOC NO.").Range("M" & i).Value = "¦¨¥»ªí"
  10.     Next

  11. error1:
  12.     Worksheets("2019 TRADING SOC NO.").Range("L" & i).Value = WorksheetFunction.VLookup(Worksheets("2019 TRADING SOC NO.").Range("E" & i).Value, Worksheets("´Á³fÁ`¶× (2020.09.16)").Range("A:G"), 7, 0)
  13.     If Err Then Err.Clear: GoTo error2
  14.     Worksheets("2019 TRADING SOC NO.").Range("M" & i).Value = "´Á³fªí"
  15.    
  16. error2:
  17.     Worksheets("2019 TRADING SOC NO.").Range("L" & i).Value = ""
  18.     If Err Then MsgBox "Error has found"

  19. Application.Calculation = xlCalculationAutomatic
  20. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD