Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
The Mage
 
Posts: n/a
Default Count matching cells


I have 2 columns of 30 numbers, side by side. All numbers are 1 to 6.
I need to count every time the numbers in a row both equal 2, 3, 4, or
5. (Matching pairs.)

I cannot think of how to do this without using 30 if functions for each
number, and summing the count. To clarify I need to count total
matching 2’s, then total matching 3’s, etc.

Thanks for any assistance.


--
The Mage
------------------------------------------------------------------------
The Mage's Profile: http://www.excelforum.com/member.php...o&userid=27341
View this thread: http://www.excelforum.com/showthread...hreadid=468496

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=SUMPRODUCT(--(A1:A30={2,3,4,5}),--(B1:B30={2,3,4,5}))

--
HTH

Bob Phillips

"The Mage" wrote in
message ...

I have 2 columns of 30 numbers, side by side. All numbers are 1 to 6.
I need to count every time the numbers in a row both equal 2, 3, 4, or
5. (Matching pairs.)

I cannot think of how to do this without using 30 if functions for each
number, and summing the count. To clarify I need to count total
matching 2's, then total matching 3's, etc.

Thanks for any assistance.


--
The Mage
------------------------------------------------------------------------
The Mage's Profile:

http://www.excelforum.com/member.php...o&userid=27341
View this thread: http://www.excelforum.com/showthread...hreadid=468496



  #3   Report Post  
The Mage
 
Posts: n/a
Default


Thank you so much, that was exactly what I was looking for.


--
The Mage
------------------------------------------------------------------------
The Mage's Profile: http://www.excelforum.com/member.php...o&userid=27341
View this thread: http://www.excelforum.com/showthread...hreadid=468496

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

my pleasure.

--
HTH

Bob Phillips

"The Mage" wrote in
message ...

Thank you so much, that was exactly what I was looking for.


--
The Mage
------------------------------------------------------------------------
The Mage's Profile:

http://www.excelforum.com/member.php...o&userid=27341
View this thread: http://www.excelforum.com/showthread...hreadid=468496



  #5   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

You may also use an array formula (Ctrl+Shift+Enter) to accomplish the same.

=sum(if((range=2),1,0)
=sum(if((range=3),1,0) etc.

Regards,

"The Mage" wrote:


I have 2 columns of 30 numbers, side by side. All numbers are 1 to 6.
I need to count every time the numbers in a row both equal 2, 3, 4, or
5. (Matching pairs.)

I cannot think of how to do this without using 30 if functions for each
number, and summing the count. To clarify I need to count total
matching 2s, then total matching 3s, etc.

Thanks for any assistance.


--
The Mage
------------------------------------------------------------------------
The Mage's Profile: http://www.excelforum.com/member.php...o&userid=27341
View this thread: http://www.excelforum.com/showthread...hreadid=468496


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
Matching cells [email protected] Excel Discussion (Misc queries) 0 July 1st 05 02:43 PM
Character Count Range of Cells michimac Excel Discussion (Misc queries) 1 May 29th 05 11:26 PM
Character Count Range of Cells Naz Excel Discussion (Misc queries) 0 May 29th 05 10:28 PM
how 2 Count number of cells that have specific condition format? daveydavey Excel Worksheet Functions 2 May 4th 05 02:06 PM
count cells that have *text1* and don't have *text2* amntre Excel Discussion (Misc queries) 1 April 6th 05 12:50 PM


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

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"