Excel VBA找到特定字符并删除其所在行以下的所有记录

2025-03-13 20:52:13
推荐回答(1个)
回答1:

sub test()
myrow=Range("A65536").End(xlUp).Row
for i=myrow to 1 step -1
    if range("A" & myrow )="X" then
        Range("A" & i & ":A" & myrow).ClearContents
    end if
next
end sub