【发布时间】:2021-08-28 00:27:48
【问题描述】:
我知道这个问题可能会被问到很多,但我无法找到或理解我正在寻找的确切答案。
我今天第一次在 excel 中学习 VBA,我正在尝试自动格式化一个值表,并希望它适用于不同的范围大小。
我不知道如何在我的选择中选择最后一行下方的行并设置格式。
到目前为止我的代码是:
Selection.CurrentRegion.Select
Selection.Rows("1:1").Interior.Color = 12155648
With Selection.Rows("1:1").Font
.ThemeColor = xlThemeColorDark1
.Bold = True
End With
Selection.CurrentRegion.Select
Selection.Cells(Selection.Rows.Count, Selection.Columns.Count).Select
Selection.Interior.Color = 12632256
Selection.Font.Bold = True
Selection.Range("A1").Value = "Total"
我想要发生的事情:
【问题讨论】: