Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种将小计标签的标签更改为只说总计而不是组总计的方法。
所以代替这个:
Group Value A 100 A 200 A Total 300
我明白了:
Group Value A 100 A 200 Total 300
您可以编写一个快速宏来更改它。假设小计公式在 B 列中(在我的示例中为 b2:b8,易于更改),并且“组总计”标题在 A 列中,那么这应该有效:
Dim mycell As Range For Each mycell In Range("B2:B8"): If Mid(mycell.Formula, 1, 9) = "=SUBTOTAL" Then mycell.Offset(0, -1).Value = "Total" End If Next mycell