EXCEL VBA:如果cell.value =“WORD”在一个范围内如何manupulate下一个单元格(相同的行)值
我想改变在一个范围内,如果cell.value =“单词”在同一行中的下一个单元格。 我已经定义了范围,使用“for”循环。 在我的代码中,
if cell.value="FOUND THE CELL" then cell.value+1="changed the next right side cell" cell.value+2="changed the second right side cell" end if
我知道这是错的。 我们怎么办呢?
If cell.Value2 = "FOUND THE CELL" Then cell.Offset(0, 1).Value2 = "changed the next right side cell" cell.Offset(0, 2).Value2 = "changed the second right side cell" End If