Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Lingyan Hu
 
Posts: n/a
Default Number of cells that have same values

Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows where the two
corresponding cells have the same value?
  #2   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default Number of cells that have same values

Assume your Columns are A and B, and your rows go down to 20, Array enter
this formula (CTRL+SHIFT+ENTER):

=SUM(IF(A1:A20=B1:B20,1,0))

Change the column and row references to fit your data.

--
Regards,
Dave


"Lingyan Hu" wrote:

Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows where the two
corresponding cells have the same value?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Number of cells that have same values

=SUMPRODUCT(--(A2:A20=B2:B20),--(A2:A20<""),--(B2:B20<""))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Lingyan Hu" <Lingyan wrote in message
...
Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows where the

two
corresponding cells have the same value?



  #4   Report Post  
Posted to microsoft.public.excel.misc
Lingyan Hu
 
Posts: n/a
Default Number of cells that have same values

Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the formula?
I tried, but it doesn't seem to work.

"David Billigmeier" wrote:

Assume your Columns are A and B, and your rows go down to 20, Array enter
this formula (CTRL+SHIFT+ENTER):

=SUM(IF(A1:A20=B1:B20,1,0))

Change the column and row references to fit your data.

--
Regards,
Dave


"Lingyan Hu" wrote:

Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows where the two
corresponding cells have the same value?

  #5   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default Number of cells that have same values

Type this formula in the formula bar, and instead of just pushing "Enter" to
commit it, push CTRL+SHIFT+ENTER.

Also, after looking at Bob's post I realize my formula isn't taking into
account blank cells, change to the following to fix (or just use Bob's
formula):

=SUM(IF(((A1:A20=B1:B20)*(A1:A20<"")*(B1:B20<"") ),1,0))

--
Regards,
Dave


"Lingyan Hu" wrote:

Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the formula?
I tried, but it doesn't seem to work.

"David Billigmeier" wrote:

Assume your Columns are A and B, and your rows go down to 20, Array enter
this formula (CTRL+SHIFT+ENTER):

=SUM(IF(A1:A20=B1:B20,1,0))

Change the column and row references to fit your data.

--
Regards,
Dave


"Lingyan Hu" wrote:

Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows where the two
corresponding cells have the same value?



  #6   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Number of cells that have same values

Dave,

Your version can do away with the IF test

=SUM(((A1:A20=B1:B20)*(A1:A20<"")*(B1:B20<"")))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"David Billigmeier" wrote in
message ...
Type this formula in the formula bar, and instead of just pushing "Enter"

to
commit it, push CTRL+SHIFT+ENTER.

Also, after looking at Bob's post I realize my formula isn't taking into
account blank cells, change to the following to fix (or just use Bob's
formula):

=SUM(IF(((A1:A20=B1:B20)*(A1:A20<"")*(B1:B20<"") ),1,0))

--
Regards,
Dave


"Lingyan Hu" wrote:

Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the

formula?
I tried, but it doesn't seem to work.

"David Billigmeier" wrote:

Assume your Columns are A and B, and your rows go down to 20, Array

enter
this formula (CTRL+SHIFT+ENTER):

=SUM(IF(A1:A20=B1:B20,1,0))

Change the column and row references to fit your data.

--
Regards,
Dave


"Lingyan Hu" wrote:

Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows

where the two
corresponding cells have the same value?



  #7   Report Post  
Posted to microsoft.public.excel.misc
David Billigmeier
 
Posts: n/a
Default Number of cells that have same values

Very true, there are many ways to word it.


--
Regards,
Dave


"Bob Phillips" wrote:

Dave,

Your version can do away with the IF test

=SUM(((A1:A20=B1:B20)*(A1:A20<"")*(B1:B20<"")))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"David Billigmeier" wrote in
message ...
Type this formula in the formula bar, and instead of just pushing "Enter"

to
commit it, push CTRL+SHIFT+ENTER.

Also, after looking at Bob's post I realize my formula isn't taking into
account blank cells, change to the following to fix (or just use Bob's
formula):

=SUM(IF(((A1:A20=B1:B20)*(A1:A20<"")*(B1:B20<"") ),1,0))

--
Regards,
Dave


"Lingyan Hu" wrote:

Shall I push (CTRL+SHIFT+ENTER) at the same time while entering the

formula?
I tried, but it doesn't seem to work.

"David Billigmeier" wrote:

Assume your Columns are A and B, and your rows go down to 20, Array

enter
this formula (CTRL+SHIFT+ENTER):

=SUM(IF(A1:A20=B1:B20,1,0))

Change the column and row references to fit your data.

--
Regards,
Dave


"Lingyan Hu" wrote:

Imagine there are two columns of cells, each row of two cells are
corresponding to each other. How to find out the number of rows

where the two
corresponding cells have the same value?




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
How do I sum up values only in cells that are color filled? TryingExcel Excel Worksheet Functions 7 April 12th 09 03:34 PM
Number format exactly the same, displays differently in some cells eider Excel Discussion (Misc queries) 1 July 29th 05 12:26 AM
Counting the total number of cells with specified condition(freque Kelvin Excel Discussion (Misc queries) 2 July 10th 05 12:22 PM
Counting the number of cells meeting conditional formating criteria Jeff Excel Worksheet Functions 4 July 9th 05 01:18 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:21 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"