Reputation: 133
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.
Upvotes: 0
Views: 3424
Reputation: 566
you can simply do =countblank(A1)+countblank(b2)+countblank(c3)+countblank(d4)+countblank(e5)
as the number of cells you count is not that high
Upvotes: 3