PC Review


Reply
Thread Tools Rate Thread

count identical values in 2 rows

 
 
Piet
Guest
Posts: n/a
 
      6th Apr 2010
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 With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      6th Apr 2010
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?

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      6th Apr 2010
For each row

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

and copy dwn

--

HTH

Bob

"Piet" <(E-Mail Removed)> wrote in message
newsF24AE12-6458-4BA1-8711-(E-Mail Removed)...
>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 With Quote
 
Ms-Exl-Learner
Guest
Posts: n/a
 
      6th Apr 2010
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?

 
Reply With Quote
 
Piet
Guest
Posts: n/a
 
      7th Apr 2010
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" <(E-Mail Removed)> wrote in message
> newsF24AE12-6458-4BA1-8711-(E-Mail Removed)...
> >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 With Quote
 
Piet
Guest
Posts: n/a
 
      7th Apr 2010
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?

 
Reply With Quote
 
Piet
Guest
Posts: n/a
 
      7th Apr 2010
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?

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      7th Apr 2010
This may help you http://xldynamic.com/source/xld.SUMPRODUCT.html

--

HTH

Bob

"Piet" <(E-Mail Removed)> wrote in message
news:97ABA64F-2E01-4DD8-A2A0-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> newsF24AE12-6458-4BA1-8711-(E-Mail Removed)...
>> >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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count rows b/w values and insert that # of rows elsewhere Robin Microsoft Excel Programming 1 21st Dec 2009 05:16 PM
Count values in Visible ROWS only Randy Microsoft Excel Programming 6 15th Dec 2009 03:30 AM
Need a formula to count values in different rows ceri_m Microsoft Excel Worksheet Functions 7 10th Apr 2008 11:14 AM
How to count rows with values in two columns Stapes Microsoft Excel Discussion 1 26th Jul 2007 02:23 PM
How do I get Excel to count identical rows in a list? =?Utf-8?B?QWxpIERlbm5pcw==?= Microsoft Excel Misc 1 28th Oct 2004 04:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:15 AM.