This macro will generate a hierarchy table that displays all the parents of a given child field, based on an input that provides a list of child-parent relationships. Configure the macro by selecting which field in your incoming data you would like to use as the "Child" field, and which you would like to use as the "Parent". Macro will iterate through all child-parent roll-ups and output a table showing the hierarchy for each child field (first parent in field [1], the parent's parent in field [2], etc.)
NOTE: This macro will only work for unique child-parent combinations, i.e. a parent can have many children, but a child can only have one parent.
For a blog article describing the macro in detail, please refer to this (slightly ridiculous but very informative) article: Building a Hierarchy with Kevin Bacon