代码 比较简单:
如下 复制到工作表代码区
sub haoma()
for i=[b65536].end(xlup).row to 2 step -1
n=n+1
cells(i,"a")=n
next
end sub
代码如下,
Sub xx()
Dim a, b&
b = 0
a = Application.CountA(Range("b:b"))
For i = 2 To a
Range("a" & i) = a - b - 1
b = b + 1
Next
End Sub
可以发文件或图来看看吗?
怎么叫根据B列?