#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default & with COUNTIF

I found the answer to my problem in this post:

http://www.microsoft.com/office/comm...=en-us&m=1&p=1

but I don't understand why this works when using a cell reference for
criteria. Does it work because the reference is text? If someone could
explain it to me I would appreciate it.

TIA

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default & with COUNTIF

When you use a string like

"<D10"

Excel does not evaluate the value of D10 and incorporate it into the count criteria.

"<" & D10

will be evaluated to incorporate the value of D10...

HTH,
Bernie
MS Excel MVP


"AFJr" wrote in message
...
I found the answer to my problem in this post:

http://www.microsoft.com/office/comm...=en-us&m=1&p=1

but I don't understand why this works when using a cell reference for
criteria. Does it work because the reference is text? If someone could
explain it to me I would appreciate it.

TIA



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default & with COUNTIF

=COUNTIF(B2:B6,"<D2")

will test for a text value which is less than the value of the text "D2" in
B2:B6

=COUNTIF(B2:B6,"<" & D2)

will test for value which is less than in that in cell D2.

D2 can contain data of various formats not just text.

So if D2=10 (numeric) , it will test for numbers < 10: the equivalent
formula is:

=COUNTIF(B2:B6,"<10")

HTH




"AFJr" wrote:

I found the answer to my problem in this post:

http://www.microsoft.com/office/comm...=en-us&m=1&p=1

but I don't understand why this works when using a cell reference for
criteria. Does it work because the reference is text? If someone could
explain it to me I would appreciate it.

TIA

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
countif ? dmack Excel Discussion (Misc queries) 3 January 25th 07 10:16 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"