简体   繁体   中英

How can I count non adjacent blank cells in excel?

I am working on a search function that searches a table in another worksheet that contains client information, from a cell using VLOOKUP. I have 5 "search box" cells and want to be able to search by one criteria at a time, but only if the other 4 search Criteria boxes are empty. So if there was text in more than one of the search boxes at once it would return an error message.

I achieved a desirable result in the first box using COUNTBLANK() like so: COUNTBLANK(B5:B8)=4 nesting it in an IF statement in the formula bar

My question is...How can I count the number of nonadjacent blank cells? So I can confirm that they are empty.

您可以简单地执行=countblank(A1)+countblank(b2)+countblank(c3)+countblank(d4)+countblank(e5)因为您所计数的单元格数量并不高

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM