Identify a child cell in an array

2019-04-10 09:43发布

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).

enter image description here

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

1条回答
贼婆χ
2楼-- · 2019-04-10 10:20

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

=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:

enter image description here

查看更多
登录 后发表回答