【问题标题】:Flattening Outlined Data then rebuild Outlines again展平大纲数据,然后再次重建大纲
【发布时间】:2021-05-25 22:34:26
【问题描述】:

致我的同行们,

基本上,我从业务系统中提取了一份 BOM,该系统生成了一份概述报告(没有模板只是将数据推送到 Excel 表中)。一个示例如下所示:

我需要展平这个提取物以执行一些操作,无论如何使用显示的列我可以将大纲分组再次重建到原来的样子?

谢谢

【问题讨论】:

  • “重新构建 Outline 分组到原来的样子” - 怎么样?
  • 你觉得怎么样?太棒了,哈哈......非常感谢蒂姆,非常感谢,伙计

标签: excel vba parent outline


【解决方案1】:
Public Sub SetOutline()

  Dim i As Long

  With [A:A].Cells                        'column containing levels
    For i = 1 To .Count
      If IsEmpty(.Item(i)) Then Exit For  'quit at first blank cell
      .Item(i).EntireRow.OutlineLevel = .Item(i).Value + 1 'set outline
'      .Item(i).EntireRow.ClearOutline    'this would remove the outline
    Next i
  End With

End Sub

【讨论】:

  • 非常感谢这是完美的
猜你喜欢
  • 2016-06-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-28
  • 1970-01-01
  • 2017-10-26
相关资源
最近更新 更多