Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default How do I count sets of cells in two columns?

1 2
a 4
b 2
a 4
c 3
b 4

For the above example, I would like a formula that can count how many times
"a" appears in column 1 with "4" in column 2 of the same row. The output for
this example should be 2
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default How do I count sets of cells in two columns?

On Jul 30, 10:04*pm, David wrote:
1 * 2
a * 4
b * 2
a * 4
c * 3
b * 4

For the above example, I would like a formula that can count how many times
"a" appears in column 1 with "4" in column 2 of the same row. *The output for
this example should be 2


In column C: =A1&B1, copy down. Then in any cell, assuming 5 rows:
=COUNTIF(C1:C5,"=a4") - but there's probably a more elegant way!
Watch below...
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How do I count sets of cells in two columns?

Try this:

=SUMPRODUCT(--(A1:A5="a"),--(B1:B5=4))


--
Biff
Microsoft Excel MVP


"David" wrote in message
...
1 2
a 4
b 2
a 4
c 3
b 4

For the above example, I would like a formula that can count how many
times
"a" appears in column 1 with "4" in column 2 of the same row. The output
for
this example should be 2



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
Multiple sets of columns into one set of columns no blanks CathyH Excel Discussion (Misc queries) 0 May 22nd 07 09:11 PM
count cells with year sets in a column? Brainless_in_Boston New Users to Excel 3 May 4th 06 10:12 PM
How to count sets of numbers JimDandy Charts and Charting in Excel 2 March 29th 06 10:45 PM
Count rows that match 3 sets of criteria? EricE Excel Worksheet Functions 3 December 29th 05 04:26 PM
count cells across muliple columns Robb27 Excel Worksheet Functions 3 April 15th 05 05:57 PM


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