就是这个如何把sheet1.cells(i,2).value="是",如何把“是”这个值替换成被查找到的值

Sub查找d()Dim目标AsRange,rngAsRange,srngAsRange,iAsIntegerFori=1To1000Step1Setsrng=Sheet1... Sub 查找d()
Dim 目标 As Range, rng As Range, srng As Range, i As Integer
For i = 1 To 1000 Step 1
Set srng = Sheet1.Cells(i, 1)
Sheet2.Select
With ActiveSheet.UsedRange
Set 目标 = .Find(srng, LookIn:=xlValues, lookat:=xlPart)
If Not 目标 Is Nothing Then
Sheet1.Cells(i, 2).Value = "是"
Else: Sheet1.Cells(i, 2).Value = "否"
End If
End With
Next i
End Sub
展开
 我来答
百度网友a91786d
2015-09-18 · TA获得超过275个赞
知道小有建树答主
回答量:233
采纳率:50%
帮助的人:82.5万
展开全部
按键精灵 哈哈哈
Sub 查找d()
Dim 目标 As Range, rng As Range, srng As Range, i As Integer
For i = 1 To 1000 Step 1
Set srng = Sheet1.Cells(i, 1)
Sheet2.Select
With ActiveSheet.UsedRange
Set 目标 = .Find(srng, LookIn:=xlValues, lookat:=xlPart)
If Not 目标 Is Nothing Then
Sheet1.Cells(i, 2).Value = "是"
是 = Sheet1.Cells(i, 2).Value
Else: Sheet1.Cells(i, 2).Value = "否"
End If
End With
Next i
End Sub
来自:求助得到的回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式