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

¤@­Óvlookupªº°ÝÃD

¤@­Óvlookupªº°ÝÃD

¥H¤U¬O°õ¦æªºµ{¦¡¡A¦ý°õ¦æ¥X¨Óªºµ²ªG¦³»~¡A¦pªþ¥ó¡A½Ð¦U¦ì¥ý¶i¨ó§U¨¹¤p§Ì¸Ñ´b
Private Sub CommandButton1_Click()
Dim Ay(4, 2), D As Range
Ay(0, 0) = 1: Ay(0, 1) = "3500¤º": Ay(1, 0) = 3499: Ay(1, 1) = "4000¤º": Ay(2, 0) = 3999: Ay(2, 1) = "6000¤º": Ay(3, 0) = 6001: Ay(3, 1) = "6000¤W"
   With Sheet1
Set D = .Range(.[B10], .[B65536].End(xlUp))
       For Each N In D
         If N <> "" Then
         m = N
         P = Application.VLookup(m, Ay, 2)
         If Not IsError(P) Then D.Offset(, 1) = P
         End If
       Next           
    End With   
End Sub

TEST.zip (29.72 KB)

¦^´_ 1# lone_tiger0303
If Not IsError(P) Then D.Offset(, 1) = P Åܼƭn§Ë²M·¡
  1. For Each n In D
  2.          If n <> "" Then
  3.             m = n
  4.             P = Application.VLookup(m, Ay, 2)
  5.             If Not IsError(P) Then n.Offset(, 1) = P    ''' ¤£¬O  D.Offset(, 1) = P
  6.          End If
  7.        Next
½Æ»s¥N½X

TOP

ªü~~³ºµM¥Ç³oºØ¿ù~~·PÁ±zªº¨ó§U

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD