选将第一行点左对齐,然后下一行点右对齐,接著同时选中两行点格式刷按顺序去刷其他的行就可以了,
选择一个单元格左对齐,然后下一行同列单元格右对齐,再选择这两个单元格后点击“格式刷”按钮,然后选择第三行同列单元格至本列最后一行进行格式刷,即可。
可以用宏进行设置,代码如下,复制在模块中运行即可,测试成功。
Sub Macro1()
With Sheet1工作表为sheet1
.Activate’激活工作表sheet1
HS = .Range("A65536").End(xlUp).Row '测定A列行数
For N = 2 To HS
.Cells(N, 1).Select
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
N = N + 1
Next N
For N = 3 To HS
.Cells(N, 1).Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
N = N + 1
Next N
End With
End Sub
好像没有好的办法,只能手动对齐。
貌似是可以用代码实现的、不过我不会