小编ksm*_*144的帖子

如何使用For循环替换偏移单元格

所以我写了一个For循环代码,试图搜索包含以"GE90"开头的描述的单元格的特定列(列M),并用"GE90 Hold"替换adjecent偏移单元格(C列).

我以为我正确使用了代码但由于某种原因它似乎不起作用.

Dim Cell
For Each Cell In Range("M2:M" & LastRow)
    If Cell.Value = "GE90*" Then
        Cell.Offset(, -10).Value = "GE90 Hold"
    End If

Next Cell
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

3
推荐指数
1
解决办法
642
查看次数

标签 统计

excel ×1

excel-vba ×1

vba ×1