Build a Tree in Excel: How to Create Hierarchy Charts
In this article
To build a tree in Excel, the fastest method is using the SmartArt Hierarchy tool, which automatically generates connected boxes and lines based on a bulleted list. This allows you to visualize organizational charts, family trees, or decision logic without manually drawing every line. Depending on your version of Excel, some menu labels may differ slightly, but the core functionality remains consistent across desktop versions.
What You'll Need
- Microsoft Excel installed on a PC or Mac.
- A clear list of the hierarchy levels (who reports to whom or which category belongs to which parent).
- A basic understanding of the Insert menu.
Step-by-Step
- Prepare Your Data: Before opening the tool, write out your hierarchy on a piece of paper or in a separate text file. For example, if you are building a company tree, list the CEO at the top, followed by the VPs, and then the Managers. Having this sequence ready prevents you from having to restructure the chart multiple times while editing.
- Open the SmartArt Menu: Go to the Insert tab on the top ribbon. In the Illustrations group, click on SmartArt. A dialog box will appear showing various categories of graphics.
- Select the Hierarchy Layout: In the SmartArt gallery, click on Hierarchy in the left-hand pane. You will see several options, such as the Organization Chart, Hierarchy, and Horizontal Hierarchy. For a traditional top-down tree, select the first option (Organization Chart) and click OK.
- Enter Your Text: A graphic will appear on your sheet with a "Text Pane" on the left side. If the Text Pane is not visible, click the small arrow icon on the left edge of the SmartArt border. Type your names or categories into the bulleted list in the Text Pane. The boxes in the chart will update automatically as you type.
- Create Tree Levels (Indenting): To move a box down a level in the tree (making it a "child" of the box above it), click on the text in the Text Pane and press the Tab key on your keyboard. To move a box back up a level (making it a "parent"), press Shift + Tab. This is the most critical step for defining the structure of your tree.
- Add New Branches: To add another person or category at the same level as an existing one, simply press Enter in the Text Pane. A new box will appear at that specific hierarchical level.
- Add an Assistant: In an organizational tree, you often need a role that sits off to the side (like an Executive Assistant). Right-click an existing box in the chart, select Add Shape, and then choose Add Assistant. This creates a side-branch that does not push other boxes further down the tree.
- Customize the Visuals: Click on the chart to reveal the SmartArt Design tab in the ribbon. Here, you can click Change Colors to apply a professional palette or select different SmartArt Styles to add 3D effects, shadows, or polished borders.
- Adjust Layout and Size: Click and drag the corners of the SmartArt container to resize the entire tree. If the boxes look too crowded, you can click and drag individual boxes to reposition them, though SmartArt generally handles the spacing automatically to maintain symmetry.
- Final Polish: To make the tree look professional, go to the View tab and uncheck Gridlines. This removes the Excel cell borders from the background, making your tree look like a standalone document rather than a spreadsheet.
Common Mistakes
One of the most frequent errors is attempting to type directly into the boxes on the chart. While this works, it is much slower and more prone to errors than using the Text Pane. If you have a complex tree with more than ten nodes, typing in the boxes often leads to misalignment and frustration.
Another common mistake is forgetting to use the Tab key for indentation. Users often try to drag boxes manually to create a hierarchy, but this does not actually change the underlying data structure of the SmartArt. If you move a box visually but don't indent it in the Text Pane, Excel will not recognize the relationship between the parent and child nodes, which can cause the chart to break when you add new items.
Many users also fail to account for the "Assistant" role. They try to add an assistant as a regular subordinate, which pushes all other managers to the right, making the chart excessively wide and difficult to print on a standard A4 or Letter page. Using the specific "Add Assistant" function keeps the chart compact.
Tips
For very large trees, consider using the Horizontal Hierarchy layout. Traditional vertical trees become extremely wide as you add more levels, often requiring you to zoom out so far that the text becomes unreadable. A horizontal tree reads from left to right, which utilizes the width of a computer screen more effectively.
If you need total control over the lines and shapes—perhaps for a non-standard tree where one child has two parents—SmartArt may be too restrictive. In these cases, you can convert the SmartArt to shapes. Right-click the border of the SmartArt and select Convert to Shapes. Warning: once you do this, you can no longer use the Text Pane or the automatic hierarchy tools; you will have to move every box and line manually.
To keep your tree organized, use a consistent naming convention. If you are building a technical tree (like a site map), use verbs for actions and nouns for pages. If it is an org chart, include both the person's name and their job title in the box, separated by a line break (Press Ctrl + Enter in the Text Pane to create a new line within a single box).
Troubleshooting
The Text Pane has disappeared: If you cannot find the list to enter your data, look for the small arrow icon on the left side of the SmartArt graphic. Click it to toggle the pane back into view. Alternatively, right-click the SmartArt and select Show Text Pane.
The boxes are too small to read: This usually happens when there are too many items at one level. To fix this, try changing the layout to a "Hierarchy" style that stacks boxes vertically rather than horizontally. You can also increase the overall size of the SmartArt container by dragging the corners, or decrease the font size by selecting the text in the Text Pane and using the Home tab font settings.
Lines are crossing or look messy: This occurs when you have manually dragged boxes away from their automatic positions. To reset the layout, select the SmartArt, go to the SmartArt Design tab, and try a different layout style. This often "snaps" the boxes back into a clean, logical alignment.
The chart is cutting off when printing: Excel sheets are infinite, but paper is not. Go to the Page Layout tab and change the Orientation to Landscape. If the tree is still too large, select Scale to Fit and set the Width to 1 page. This will shrink the tree to fit the paper, though you should check that the text remains legible.
Frequently Asked Questions
Can I link the tree boxes to cells in my spreadsheet?
SmartArt does not natively support dynamic linking to cells. If you change a value in a cell, the SmartArt box will not update automatically. To achieve this, you would need to use a specialized Excel Add-in or build the tree manually using Shapes and using the formula bar to link a shape to a cell.
How do I delete a branch from the tree?
The cleanest way to delete a branch is through the Text Pane. Click on the bullet point of the item you want to remove and press the Backspace or Delete key. This will remove the box and all of its subordinate "child" boxes automatically.
Can I add images or photos to the tree?
Yes, but only if you choose a specific layout. In the Hierarchy category, select the Picture Organization Chart. This adds a circular or square image placeholder to each box. You can then click the image icon in the box to upload a photo from your computer.
Is there a limit to how many levels I can add?
There is no hard limit to the number of levels, but there is a practical limit based on readability. Once you exceed 5 or 6 levels, the boxes become very small. At that point, it is better to create multiple trees on different sheets (e.g., one main tree and several detailed sub-trees).
How do I change the line style between boxes?
To change the lines, you must first convert the SmartArt to shapes (Right-click > Convert to Shapes). Once converted, you can click on individual lines and use the Shape Format tab to change the color, weight, or style (e.g., changing a solid line to a dashed line).