如何在excel中的一个特定行中搜索字符串?我在长类型变量中有行索引。
Dim rowIndex As Long
rowIndex = // some value being set here using some code.
现在我需要检查行中是否存在特定值,其索引是 rowIndex。
如果匹配,我需要获取第一个匹配单元格的列索引。
我曾尝试使用 Match 函数,但我不知道如何传递 rowIndex 变量来代替单元格范围。
Dim colIndex As Long
colIndex = Application.Match(colName, Range("B <my rowIndex here>: Z <my rowIndex here>"), 0)