软件:excel
版本:2007
需求很简单
比对sheets("设定")的A栏 若有这个值就在比对资料那一字段旁传回 "V"
没有就空格
但是会出现此处需要物件
不知道那边想错了...
Dim kx As String
Set sht1 = Sheets("资料")
sht1.Select
lastrow = Range("A1").End(xlDown).Row
col1 = Range("A1").End(xlToRight).Column + 1
With Sheets("设定").Range("A:A")
For i = 3 To lastrow
Set kx = .Find(What:=Range("A" & i).Text, LOOKAT:=xlWhole)
^^会出现此处需要物件
If Not k Is Nothing Then
Cells(i, col1) = "V"
Else
Cells(i, col1) = ""
End If
Next i
End With