二、还有一种插入vba代码的方法: 点击【开发工具】选项卡下的【visual basic】选项,或者按【alt+F11】组合键,调出vba窗口。点击【视图】/【代码窗口】,就调出了vba代码窗口。
将以下代码录入代码窗口内。 Sub 定位填充() Dim rng As Range, rn$ On Error Resume Next For Each rng In Range("b2:f13") If rng = "" Then rn = rn & rng.Address & "," Range(Left(rn, Len(rn) - 1)) = "补考" Next End Sub