0
Sub test1()
Dim Str As String
Dim Search As String
Dim Status As String
Str = Cells(2, 5).Value
Search = FDSA!Cells(2, 5).Value
Status = FDSA!Cells(2, 10).Value
If InStr(Search, Str) = True Then
Status = "ok"
Else
End If
End Sub
我将用循环来构建它。我想检查一下Cells(2,5)中是否包含在FDSA!Cells(2,5)中。如果这是真的,那么我想标记FDSA!Cells(2,10)。我收到一个对象所需的消息。这是我看过示例和教程后可以想到的。让我知道你是否有问题比较不同的工作表中的两个单元格,设置不同的单元格为好
只有第二次在VBA工作。 提前致谢,Alexis M.
非常感谢你,这已经完成了我所要求的。祝你有美好的一天! –