¥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 |