Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 414
Default Count of Different Columns

I have exported an Access crosstab query into Excel. Each row has a unique
identifier and I have 50 columns with different counts for each row. I need
to know which rows have counts in more than one column and how many columns
have a count in per row.

i.e. For Row 1 I would want to report a value of 1 as there is a value in
only one column, Row 2 I would want to report a value of 2 and Row 3 I would
want to report a value of 3. With 50 columns I need an easy way!!!

Column A Column B Column C
Row 1 6 0 0
Row 2 1 0 3
Row 3 4 1 1
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 293
Default Count of Different Columns

If you had 4 columns to look at you would place this in the 5 th column ie E1
=COUNTIF(A1:D1,"0")

Adapt to suit your no of columns

stew


"Andy" wrote:

I have exported an Access crosstab query into Excel. Each row has a unique
identifier and I have 50 columns with different counts for each row. I need
to know which rows have counts in more than one column and how many columns
have a count in per row.

i.e. For Row 1 I would want to report a value of 1 as there is a value in
only one column, Row 2 I would want to report a value of 2 and Row 3 I would
want to report a value of 3. With 50 columns I need an easy way!!!

Column A Column B Column C
Row 1 6 0 0
Row 2 1 0 3
Row 3 4 1 1

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Count of Different Columns

Andy,

Put this in c1 and drag down

=COUNT(IF(A1:D1<0,A1:D1))

'This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike

"Andy" wrote:

I have exported an Access crosstab query into Excel. Each row has a unique
identifier and I have 50 columns with different counts for each row. I need
to know which rows have counts in more than one column and how many columns
have a count in per row.

i.e. For Row 1 I would want to report a value of 1 as there is a value in
only one column, Row 2 I would want to report a value of 2 and Row 3 I would
want to report a value of 3. With 50 columns I need an easy way!!!

Column A Column B Column C
Row 1 6 0 0
Row 2 1 0 3
Row 3 4 1 1

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Count of Different Columns

I meant put this in D1 and drag down

=COUNT(IF(A1:C1<0,A1:C1))

'This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike
"Mike H" wrote:

Andy,

Put this in c1 and drag down

=COUNT(IF(A1:D1<0,A1:D1))

'This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike

"Andy" wrote:

I have exported an Access crosstab query into Excel. Each row has a unique
identifier and I have 50 columns with different counts for each row. I need
to know which rows have counts in more than one column and how many columns
have a count in per row.

i.e. For Row 1 I would want to report a value of 1 as there is a value in
only one column, Row 2 I would want to report a value of 2 and Row 3 I would
want to report a value of 3. With 50 columns I need an easy way!!!

Column A Column B Column C
Row 1 6 0 0
Row 2 1 0 3
Row 3 4 1 1

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 293
Default Count of Different Columns

If your data was over 4 columns then this should go in E1
=COUNTIF(A1:D1,"0")
Adapt to suit your no of Columns

Best

Stew

"Andy" wrote:

I have exported an Access crosstab query into Excel. Each row has a unique
identifier and I have 50 columns with different counts for each row. I need
to know which rows have counts in more than one column and how many columns
have a count in per row.

i.e. For Row 1 I would want to report a value of 1 as there is a value in
only one column, Row 2 I would want to report a value of 2 and Row 3 I would
want to report a value of 3. With 50 columns I need an easy way!!!

Column A Column B Column C
Row 1 6 0 0
Row 2 1 0 3
Row 3 4 1 1



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 414
Default Count of Different Columns

simple really! Cheers

"stew" wrote:

If your data was over 4 columns then this should go in E1
=COUNTIF(A1:D1,"0")
Adapt to suit your no of Columns

Best

Stew

"Andy" wrote:

I have exported an Access crosstab query into Excel. Each row has a unique
identifier and I have 50 columns with different counts for each row. I need
to know which rows have counts in more than one column and how many columns
have a count in per row.

i.e. For Row 1 I would want to report a value of 1 as there is a value in
only one column, Row 2 I would want to report a value of 2 and Row 3 I would
want to report a value of 3. With 50 columns I need an easy way!!!

Column A Column B Column C
Row 1 6 0 0
Row 2 1 0 3
Row 3 4 1 1

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 to count for 3 columns Mysa Excel Worksheet Functions 2 July 22nd 08 07:39 PM
Count in two columns [email protected] Excel Worksheet Functions 6 February 3rd 07 03:57 PM
I would like to Count values in two columns. Roni Excel Worksheet Functions 6 June 5th 06 03:23 PM
count conditionally across two columns? gpoky Excel Worksheet Functions 2 December 6th 05 04:56 PM
Count certain changes between columns SLB Excel Worksheet Functions 1 November 1st 04 08:54 PM


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