Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default count identical values in 2 rows

I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has an
identical value with the corresponding cell in the header?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default count identical values in 2 rows

Piet,

Is this what you mean

=COUNTIF(B2:AX2,A2)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Piet" wrote:

I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has an
identical value with the corresponding cell in the header?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default count identical values in 2 rows

For each row

=SUMPRODUCT(--(A2:AX2<""),--(A2:AX2=$A$1:$AX$1))

and copy dwn

--

HTH

Bob

"Piet" wrote in message
...
I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has
an
identical value with the corresponding cell in the header?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default count identical values in 2 rows

Assume that you are having the header value in A1 cell and you want to count
and compare it with the 2nd Row from A2 to AX2 then use the below formula.

=COUNTIF(A2:AX2,A1)

You can also protect the cell number by adding an $ (Dollar) symbol like the
below.
=COUNTIF(A$2:AX$2,A$1)

Use the above formula other than A1 cell and A2 to AX2 range.

--
Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Piet" wrote:

I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has an
identical value with the corresponding cell in the header?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default count identical values in 2 rows

Bob,

thanks for your answer, which helps me a lot.
I have to study the function a while as I don't understand the solution, but
it works nevertheless fantastic!.

Thanks again.

Regards,
Piet

"Bob Phillips" wrote:

For each row

=SUMPRODUCT(--(A2:AX2<""),--(A2:AX2=$A$1:$AX$1))

and copy dwn

--

HTH

Bob

"Piet" wrote in message
...
I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has
an
identical value with the corresponding cell in the header?



.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default count identical values in 2 rows

Mike,

Thanks for your attemt. But it was not were I was looking for. Bob Philips
gave me the solution.
Thanks for your effort in this.
Regards,
Piet


"Mike H" wrote:

Piet,

Is this what you mean

=COUNTIF(B2:AX2,A2)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Piet" wrote:

I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has an
identical value with the corresponding cell in the header?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default count identical values in 2 rows

Thanks for your attemt. But it was not were I was looking for. Bob Philips
gave me the solution.
Thanks for your effort in this.
Regards,
Piet


"Ms-Exl-Learner" wrote:

Assume that you are having the header value in A1 cell and you want to count
and compare it with the 2nd Row from A2 to AX2 then use the below formula.

=COUNTIF(A2:AX2,A1)

You can also protect the cell number by adding an $ (Dollar) symbol like the
below.
=COUNTIF(A$2:AX$2,A$1)

Use the above formula other than A1 cell and A2 to AX2 range.

--
Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Piet" wrote:

I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that has an
identical value with the corresponding cell in the header?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default count identical values in 2 rows

This may help you http://xldynamic.com/source/xld.SUMPRODUCT.html

--

HTH

Bob

"Piet" wrote in message
...
Bob,

thanks for your answer, which helps me a lot.
I have to study the function a while as I don't understand the solution,
but
it works nevertheless fantastic!.

Thanks again.

Regards,
Piet

"Bob Phillips" wrote:

For each row

=SUMPRODUCT(--(A2:AX2<""),--(A2:AX2=$A$1:$AX$1))

and copy dwn

--

HTH

Bob

"Piet" wrote in message
...
I use Excel 2007

I have a table of about 50 columns and 60 rows.
Each row must be compared with the first row of the table:
Is there a formula, that counts the number of cells in each row that
has
an
identical value with the corresponding cell in the header?



.



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 count rows with text values in several columns. scmopar Excel Worksheet Functions 4 January 30th 09 02:20 AM
Need a formula to count values in different rows ceri_m Excel Worksheet Functions 7 April 10th 08 11:14 AM
Looking Up Datas when Key Values are Identical Frank Excel Worksheet Functions 3 November 2nd 06 03:06 AM
Lookup of identical values? TobbeGardner Excel Worksheet Functions 3 July 5th 06 10:50 PM
Count on multiple values with duplicate rows Carla Excel Worksheet Functions 1 November 22nd 05 09:25 PM


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