[Solved] Build hierarchy type presentation of data in Excel
Try this, it makes use of a temporary PivotTable… Option Explicit Sub TestMakeTree() Dim wsData As Excel.Worksheet Set wsData = ThisWorkbook.Worksheets.Item(“Sheet1”) Dim rngData As Excel.Range Set rngData = wsData.Range(“Data”) ‘<—————– this differs for me Dim vTree As Variant vTree = MakeTreeUsingPivotTable(ThisWorkbook, rngData) ‘* print it out next to data, you’d choose your own destination Dim … Read more