Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default another COUNTIF question

can the count if questions cont rows that have two different inputs in
different columns?

I need to count rows in which any of the columns in that row contain two
distinct values. So basically i need code this, Count the number or rows
that contain A AND B, in any of its columns.

Is that possible?

Thanks,

-Adam
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default another COUNTIF question

T. Valko/Biff,

Would you tell me please what the double dashes (--) mean?
--
Sociopath


"T. Valko" wrote:

If this is related to your other post where you say you have 1000's of rows
of data take the easy way:

Use a helper column and enter a formula like this on each row then copy down
to the last row:

=(COUNTIF(A4:D4,"A")0)*(COUNTIF(A4:D4,"B")0)

Then just get the SUM of the helper column.

If you want a single "brute force" formula:

=SUMPRODUCT(--(COUNTIF(OFFSET(A4:D13,ROW(A4:D13)-MIN(ROW(A4:D13)),,1),"A")0),--(COUNTIF(OFFSET(A4:D13,ROW(A4:D13)-MIN(ROW(A4:D13)),,1),"B")0))

--
Biff
Microsoft Excel MVP


"Adam" wrote in message
...
can the count if questions cont rows that have two different inputs in
different columns?

I need to count rows in which any of the columns in that row contain two
distinct values. So basically i need code this, Count the number or rows
that contain A AND B, in any of its columns.

Is that possible?

Thanks,

-Adam




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default another COUNTIF question

That is the "double unary minus" about which you were asking in another
thread.
--
David Biddulph

"SwearBear" wrote in message
...
T. Valko/Biff,

Would you tell me please what the double dashes (--) mean?
--
Sociopath


"T. Valko" wrote:

If this is related to your other post where you say you have 1000's of
rows
of data take the easy way:

Use a helper column and enter a formula like this on each row then copy
down
to the last row:

=(COUNTIF(A4:D4,"A")0)*(COUNTIF(A4:D4,"B")0)

Then just get the SUM of the helper column.

If you want a single "brute force" formula:

=SUMPRODUCT(--(COUNTIF(OFFSET(A4:D13,ROW(A4:D13)-MIN(ROW(A4:D13)),,1),"A")0),--(COUNTIF(OFFSET(A4:D13,ROW(A4:D13)-MIN(ROW(A4:D13)),,1),"B")0))

--
Biff
Microsoft Excel MVP


"Adam" wrote in message
...
can the count if questions cont rows that have two different inputs in
different columns?

I need to count rows in which any of the columns in that row contain
two
distinct values. So basically i need code this, Count the number or
rows
that contain A AND B, in any of its columns.

Is that possible?

Thanks,

-Adam






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
=countif question edju Excel Discussion (Misc queries) 5 October 4th 06 11:45 PM
countif question confused Excel Discussion (Misc queries) 3 September 21st 06 03:27 AM
Countif question mtaystl11 Excel Worksheet Functions 7 June 23rd 06 07:29 PM
countif question Cube Farmer Excel Worksheet Functions 3 February 22nd 06 04:49 PM
countif question floridasurfn Excel Worksheet Functions 3 March 14th 05 02:03 AM


All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"