SamSepi0l
SamSepi0l

Reputation: 13

Excel countifs #VALUE error

I'm getting the #VALUE error when running the following formula. I've run separate countIF statements and they work fine on their own but combined it's erroring out. I am guessing it is because the first range is a single column and the second is across multiple columns? Stumped.

=COUNTIFS(Data!G3:G2000,">"&$B$8, Data!C3:D2000,$B$2)

Data!G column are numbers, with B8 being a number I'll enter. Data!C:D is text, with B2 being text I'll enter.

Upvotes: 0

Views: 9680

Answers (2)

teylyn
teylyn

Reputation: 35915

Countifs needs each of the criteria ranges to have the same shape.

Your first criteria range is one column wide, the second is two columns wide. that is not the same shape, so you get an error. You are using wrong syntax, hence you are getting an error. Correct the formula to remove the error.

Upvotes: 2

user4039065
user4039065

Reputation:

Try,

=COUNTIFS(Data!G3:G2000, ">"&$B$8, Data!C3:C2000, $B$2)+
 COUNTIFS(Data!G3:G2000, ">"&$B$8, Data!D3:D2000, $B$2)-
 COUNTIFS(Data!G3:G2000, ">"&$B$8, Data!C3:C2000, $B$2, Data!D3:D2000, $B$2)

Upvotes: 1

Related Questions