标识数组中的子单元格

时间:2022-02-09 22:18:49

In the following array of 24 rows, there are 9 children (terminal nodes) - shaded yellow for clarity. In other words, every entry has a child except for the terminal nodes. For example, 5E has 2 two terminal nodes. 14G is a terminal node, but 15G is not. 16H is terminal. 17H has 2 children (terminal nodes). 22F also has 2 children (terminal nodes).

在下面的24行数组中,有9个子元素(终端节点)——为清晰起见,用黄色阴影表示。换句话说,除了终端节点之外,每个条目都有一个子节点。例如,5E有2个终端节点。14G是终端节点,15G不是。16 h是终端。17H有2个子节点(终端节点)。22F也有2个子节点(终端节点)。

标识数组中的子单元格

How to write an excel function or macro that identifies these terminal nodes?

如何编写一个excel函数或宏来标识这些终端节点?

1 个解决方案

#1


4  

Given your data, the following conditional format seems to work. Select A1:I24, then use this CF formula:

根据您的数据,以下条件格式似乎可以工作。选择A1:I24,使用CF公式:

=AND(A1<>"",OFFSET(A1,1,1)="")

Format with a yellow fill.

用黄色填充格式。

EDIT: Here is a screenshot of the CF dialog box, and the worksheet, for clarification:

编辑:这里是CF对话框的屏幕截图,以及工作表,以供澄清:

标识数组中的子单元格

#1


4  

Given your data, the following conditional format seems to work. Select A1:I24, then use this CF formula:

根据您的数据,以下条件格式似乎可以工作。选择A1:I24,使用CF公式:

=AND(A1<>"",OFFSET(A1,1,1)="")

Format with a yellow fill.

用黄色填充格式。

EDIT: Here is a screenshot of the CF dialog box, and the worksheet, for clarification:

编辑:这里是CF对话框的屏幕截图,以及工作表,以供澄清:

标识数组中的子单元格