Sub 宏宏宏宏宏宏宏1() For x = 2 To ActiveSheet.UsedRange.Rows.Count - 2 Step 1 If Cells(x, 1) <> Cells(x + 1, 1) And Cells(x + 1, 1) = "" Then Cells(x + 1, 1).Value = Cells(x, 1) End If Next End Sub
Cells(x, 1)代表2行1列,改成对应你的户编号列数字就可以了
标签:编号 sheet and sed edr 数字 gpo div pre
Sub 宏宏宏宏宏宏宏1() For x = 2 To ActiveSheet.UsedRange.Rows.Count - 2 Step 1 If Cells(x, 1) <> Cells(x + 1, 1) And Cells(x + 1, 1) = "" Then Cells(x + 1, 1).Value = Cells(x, 1) End If Next End Sub
标签:编号 sheet and sed edr 数字 gpo div pre
原文地址:https://www.cnblogs.com/luohaolqitfk/p/8513783.html