Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I count 2 columns of data that meet a certain criteria?

I have 2 columns of data. The first column has rows with either "b", "bhs",
"g" or "ghs". The second column has rows with age #'s (like 1, 2, 3, 5, 8,
etc). I can't figure out how to count for example the number of "b"'s and
"bhs"'s that are a particular age (say 5).
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default How do I count 2 columns of data that meet a certain criteria?

Try this:

With
A1:A30 (contains your codes: b, bhs, g, ghs, etc)
B1:B30 (contains ages: 1, 3, 5, etc)

This formula count the b's and bhs's that are age 5
C1: =SUMPRODUCT((A1:A30={"b","bhs"})*(B1:B30=5))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"RonJon" wrote:

I have 2 columns of data. The first column has rows with either "b", "bhs",
"g" or "ghs". The second column has rows with age #'s (like 1, 2, 3, 5, 8,
etc). I can't figure out how to count for example the number of "b"'s and
"bhs"'s that are a particular age (say 5).

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I count 2 columns of data that meet a certain criteria?

That does it. Thanks

"Ron Coderre" wrote:

Try this:

With
A1:A30 (contains your codes: b, bhs, g, ghs, etc)
B1:B30 (contains ages: 1, 3, 5, etc)

This formula count the b's and bhs's that are age 5
C1: =SUMPRODUCT((A1:A30={"b","bhs"})*(B1:B30=5))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"RonJon" wrote:

I have 2 columns of data. The first column has rows with either "b", "bhs",
"g" or "ghs". The second column has rows with age #'s (like 1, 2, 3, 5, 8,
etc). I can't figure out how to count for example the number of "b"'s and
"bhs"'s that are a particular age (say 5).

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
Count if two columns match different criteria Curt D. Excel Worksheet Functions 5 May 14th 23 07:44 PM
Count Cells that meet Criteria kmason Excel Worksheet Functions 6 August 24th 06 04:31 PM
How to count data in 2 columns Ltat42a Excel Discussion (Misc queries) 20 May 31st 06 05:55 PM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
How do I count data in range A:A that is dependent upon criteria . h2ocats Excel Worksheet Functions 1 February 21st 05 12:55 PM


All times are GMT +1. The time now is 04:13 AM.

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"