Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 86
Default Counting number of times data matches

I have two columns of numerical data in range a1:b40. The cells hold values
from 1 to 9.
I want to count the number of times 'column a' data is less than or equal to
'column b' data.

How do I do this?

--
Thank you,

Colin.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default Counting number of times data matches

Colin

If you want to do it with a single array formula, try:

=SUM(--(A1:A40<B1:B40))

entered as an array (shift-ctrl-enter)

Good luck.

Ken
Norfolk, Va


On Sep 11, 12:48 pm, Colin wrote:
I have two columns of numerical data in range a1:b40. The cells hold values
from 1 to 9.
I want to count the number of times 'column a' data is less than or equal to
'column b' data.

How do I do this?

--
Thank you,

Colin.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Counting number of times data matches

If you have numerical entries in all cells you can get around using

=SUMPRODUCT(--(A1:A40<=B1:B40))


but it will count blank cells and text


=SUMPRODUCT(--(A1:A40<=B1:B40),--(ISNUMBER(A1:A40)))


will take care of blank cells


=SUMPRODUCT(--(A1:A40<=B1:B40),--(ISNUMBER(A1:A40)),--(ISNUMBER(B1:B40)))


will take care of blank cells and text



--
Regards,

Peo Sjoblom



"Colin" wrote in message
...
I have two columns of numerical data in range a1:b40. The cells hold values
from 1 to 9.
I want to count the number of times 'column a' data is less than or equal
to
'column b' data.

How do I do this?

--
Thank you,

Colin.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 86
Default Counting number of times data matches

Hello,

Thank you all for your suggestions.
Without realising it, I did need to avoid counting cells with text in it.
The arrays and the Count formula both worked fine.
--
Thank you,

Colin.


"Peo Sjoblom" wrote:

If you have numerical entries in all cells you can get around using

=SUMPRODUCT(--(A1:A40<=B1:B40))


but it will count blank cells and text


=SUMPRODUCT(--(A1:A40<=B1:B40),--(ISNUMBER(A1:A40)))


will take care of blank cells


=SUMPRODUCT(--(A1:A40<=B1:B40),--(ISNUMBER(A1:A40)),--(ISNUMBER(B1:B40)))


will take care of blank cells and text



--
Regards,

Peo Sjoblom



"Colin" wrote in message
...
I have two columns of numerical data in range a1:b40. The cells hold values
from 1 to 9.
I want to count the number of times 'column a' data is less than or equal
to
'column b' data.

How do I do this?

--
Thank you,

Colin.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting number of times data matches

Hi,

Try this array:-=

=COUNT(IF(A1:A40<=B1:B20,A1:A40,FALSE))

enter with Ctrl+Shift+enter

Mike

"Colin" wrote:

I have two columns of numerical data in range a1:b40. The cells hold values
from 1 to 9.
I want to count the number of times 'column a' data is less than or equal to
'column b' data.

How do I do this?

--
Thank you,

Colin.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Counting number of times data matches

Hi,

Try this array:-=

=COUNT(IF(A1:A40<=B1:B40,A1:A40,FALSE))

enter with Ctrl+Shift+enter

Mike

"Colin" wrote:

I have two columns of numerical data in range a1:b40. The cells hold values
from 1 to 9.
I want to count the number of times 'column a' data is less than or equal to
'column b' data.

How do I do this?

--
Thank you,

Colin.

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
Counting number of times certain Text Values appear Chart_Maker_Wonderer Excel Discussion (Misc queries) 4 March 5th 07 07:13 PM
Create Chart by Counting Number of Times Data is Used Havenstar Excel Discussion (Misc queries) 2 October 11th 06 05:54 PM
counting the number of times something is bought during a month ldd Excel Worksheet Functions 1 November 22nd 05 07:18 PM
how do I count the number of times text in column A matches text i Sheila Excel Worksheet Functions 2 November 16th 05 10:20 PM
Counting the number of times someone called in sick smskater Excel Discussion (Misc queries) 3 September 16th 05 11:10 PM


All times are GMT +1. The time now is 12:36 PM.

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

About Us

"It's about Microsoft Excel"