In a subset of cells, determine if at least one corresponding cell matches a value

早过忘川 提交于 2019-12-12 03:05:02

问题


Given a table (spreadsheet) of two columns, for a subset of cells in column A that meet a particular criterion, determine if at least one of the corresponding cells in column B meet some other criterion.

For example, given the following data:

     A     B
1    DR    *
2    DR    &
3    SR    &
4    DR    *
5    SR    #
6    SR    #

I would like to know, for the subset of cells in column A that contain "DR", if there is at least one corresponding cell in column B that contains a "*". So, then, for "DR" the answer is true, but for "SR" the answer is false.

I have looked at a variety of "count if two criteria match" answers on here, but that doesn't seem to be quite it. (Or, if it is, I don't see how to make those solutions work for my example.)


回答1:


= CountIfs( A:A, "DR", B:B, "~*" ) > 0

~ is needed just for any * or ? characters.

COUNTIFS function



来源:https://stackoverflow.com/questions/40187255/in-a-subset-of-cells-determine-if-at-least-one-corresponding-cell-matches-a-val

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!