VBA编写代码时候需要用到,代码如下: Const nItem=4 For I = 0 to nItem DptName(I) = Cells(I+4,1) nTmp = DptName(0) If i > 0 then Cells(I+3,1) = nTmp End If Next Cells(I+4,1) = NewDptName