我有一个Excel工作表,看起来像这样:如何递归追加单元格?
|A B C D
-----------------------------------------------------------------------------------
1 |ID PARENTID VALUE RESOLVED VALUE (how to generate this?)
===================================================================================
2 |0 0 /root /root
3 |1 0 /one /root/one
4 |2 0 /two /root/two
5 |3 0 /three /root/three
6 |4 3 /child-one-of-three /root/three/child-one-of-three
7 |5 3 /child-two-of-three /root/three/child-two-of-three
每一行都有一个ID
和PARENTID
。我想通过再次追加每行的VALUE
来生成最后一列的内容RESOLVED VALUE
。
如何在Excel中执行此操作?
ID = 1的'PARENTID'应该是0吗?否则,没有解析的值会追溯到'/ root'。 – Excellll 2012-04-12 13:40:49
@Excellll你该死的。现在更正。 – adarshr 2012-04-12 13:41:33
您是否打开VBA解决方案?我相当肯定,只有在知道树的最大深度时,才能使用内置的工作表函数来完成此操作。 – Excellll 2012-04-12 13:51:06