Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 992

Excel: Using COUNTIF + UNIQUE gives generic error "There's a prblem with this formula"

$
0
0

I'm trying to create an excel function that counts the number of unique entries in a range of (potentially merged) cells. The UNIQUE function returns two values for merged cell, one of which is zero. This seems easy enough, just count the cells that aren't equal to zero. However, all of the following formulas result in the generic "There's a problem with this formula" error:COUNTIF(UNIQUE(A2:P2,TRUE)<>0,TRUE)COUNTIF(UNIQUE(A2:P2,TRUE),"<>0")COUNTIF(NOT(UNIQUE(A2:P2,TRUE)=0),TRUE)

What's especially infuriating is that if I put the first argument of COUNTIF in another cell (say R2), and refer to the spill range (i.e. COUNTIF(R2#,TRUE)), all 3 of those formulas work fine. What on earth is happening here?


Viewing all articles
Browse latest Browse all 992

Trending Articles