# How to correct a 2010 Excel VALUE error

I am new to Excel so this is probably a very simple solution, but I cannot figure it out and any help would be greatly appreciated.
Column A           Column B         Column C                  Column D
Row 1      Divergence                   25               Divergence                      10
Row 2                                          -25               Divergence
Row 3                                           25               sssssss
Row 4                                           25               Divergence

I created the following forumla:     =COUNTIFS(C1:C4,A1,B1:B4,">D1")
It returns the VALUE error.  I think I understand that there are 2 different data types here that is causing the problem, but I cannot figure out how to fix it.

What I am trying to do is find the number of times the word divergence is found with positive value in column B.  The answer is 2.

Thank you.
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
It should probably be

=COUNTIFS(C1:C4,A1,B1:B4,">"&D1)
Commented:
That said, not sure why you would have got a value error.
Chartered AccountantCommented:
I can't generate the error either - and probably above is definitely having tried it I get answer 2, with the addition of value 10 in D4 which I presume was a question typo.
Author Commented:
Okay, making some progress here.  I think I over simplified.  The following is more like my real problem

Column A           Column B         Column C                  Column D    Column E
Row 1      Divergence                   25               Divergence             Divergence           10
Row 2                                          -25               Divergence             Divergence
Row 3                                           25               sssssss                     ssssss
Row 4                                           25               Divergence             Divergence

Formula:   =COUNTIFS(C1:D4,A1,B1:B4,">"&D1)

I get the correct answer with only Column C, but when I add Column D I am back to VALUE error.

By the way either ">"&D1  or ">"D1 works with only Column C, but both give the error when I add Column D.
Commented:
That's a different set up. You can only have a single colum reference so C1:D4 won't work.

=SUMPRODUCT((C1:C4=A1)*(D1:D4=A1)*(B1:B4>E1))
Author Commented:
Thank you very much StephenJR.

That does indeed work to get rid of the VALUE error, but the answer is not what I am looking for.  The formula you gave me produces 2 as the result when the answer I am looking for is 4.

I want to know the number of times the word "Divergence" appears when the corresponding value in column B is greater than 10.  That condition occurs twice in column C and twice in Column D.  So I am sure there is some subtlety that I am missing.
Commented:
COUNTIFS will allow multicolumn ranges.....but they all need to be the same size within a single formula. Try this version for your result

=SUMPRODUCT((C1:D4=A1)*(B1:B4>E1))

regards, barry

Experts Exchange Solution brought to you by