Excel - Countif applied with Concatenation of Text

  • Thread starter Thread starter TKT-Tang
  • Start date Start date
T

TKT-Tang

1. Look at a worksheet ; the range A1:A10 is filled with text data.

2. Enter into cell C1, = Countif(A1:A10,"<="&A1:A10) ; it works.

3. Then, the range B1:B10 is filled with text data.

4. Enter into cell C2, = Countif(A1:A10&B1:B10,"<="&A1:A10&B1:B10) ;
it does not work.

5. Please offer an explanation that it does work and then it does not
work.

6. Regards.
 
I'm having a bit of a hard time understanding what you're trying to do...

=COUNTIF(A1:A10,"<="&A1:A10)

is functionally equivalent to

=COUNTIF(A1:A10,"<="&A1)

so I'm not sure what "works" for you.

More to the point, the first argument of COUNTIF *must* be a range of
cells (see Help for COUNTIF). It can't be an array of strings, which is
what A1:A10&B1:B10 evaluates to.
 
Back
Top