Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Calculate FREQUENCY based on criteria...

Hi there -
Stumped on this one... I want to calculate frequency for items that
meet a certain criteria. In this case, date. I have a bunch of data that
looks like this:

COL-A | COL-B
1/2/09 | 10
1/6/09 | 13
1/8/09 | 10
10/23/08 | 10
2/3/09 | 10
2/9/09 | 10

I want to calculate the FREQUENCY of COL-B data for items that occur in
2009. In the example above, that would be 4 for "10" and 1 for "13".

I'm using this data to create a frequency distribution graph.

thanks in advance!
-meat
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Calculate FREQUENCY based on criteria...

You are counting occurances based upon TWO criteria, date and value.

Whenever you are faced with more than one criteria, consider using
SUMPRODUCT()

=SUMPRODUCT((YEAR(A1:A1000)=2009)*(B1:B1000=10))


change the year and value as you desire. There is a really good write-up on
SUMPRODUCT in:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
Gary''s Student - gsnu200831


"MeatLightning" wrote:

Hi there -
Stumped on this one... I want to calculate frequency for items that
meet a certain criteria. In this case, date. I have a bunch of data that
looks like this:

COL-A | COL-B
1/2/09 | 10
1/6/09 | 13
1/8/09 | 10
10/23/08 | 10
2/3/09 | 10
2/9/09 | 10

I want to calculate the FREQUENCY of COL-B data for items that occur in
2009. In the example above, that would be 4 for "10" and 1 for "13".

I'm using this data to create a frequency distribution graph.

thanks in advance!
-meat

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Calculate FREQUENCY based on criteria...

Sure, that works. FREQUENCY is cleaner on it's own as it sorts out the bin
segments for you... but so it goes with beggars and choosers and such...

thanks!!

"Gary''s Student" wrote:

You are counting occurances based upon TWO criteria, date and value.

Whenever you are faced with more than one criteria, consider using
SUMPRODUCT()

=SUMPRODUCT((YEAR(A1:A1000)=2009)*(B1:B1000=10))


change the year and value as you desire. There is a really good write-up on
SUMPRODUCT in:

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
Gary''s Student - gsnu200831


"MeatLightning" wrote:

Hi there -
Stumped on this one... I want to calculate frequency for items that
meet a certain criteria. In this case, date. I have a bunch of data that
looks like this:

COL-A | COL-B
1/2/09 | 10
1/6/09 | 13
1/8/09 | 10
10/23/08 | 10
2/3/09 | 10
2/9/09 | 10

I want to calculate the FREQUENCY of COL-B data for items that occur in
2009. In the example above, that would be 4 for "10" and 1 for "13".

I'm using this data to create a frequency distribution graph.

thanks in advance!
-meat

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 161
Default Calculate FREQUENCY based on criteria...

As I wrote elsewhere, I like array formulas.

to count frequency of 10 in 2009, type for instance in cell c10:
=sum((year(a2:a6)=2009)*(b2:b6=10)) then press ctrl+shift+enter

the easiest way is to use Countif formula



"MeatLightning" wrote:

Hi there -
Stumped on this one... I want to calculate frequency for items that
meet a certain criteria. In this case, date. I have a bunch of data that
looks like this:

COL-A | COL-B
1/2/09 | 10
1/6/09 | 13
1/8/09 | 10
10/23/08 | 10
2/3/09 | 10
2/9/09 | 10

I want to calculate the FREQUENCY of COL-B data for items that occur in
2009. In the example above, that would be 4 for "10" and 1 for "13".

I'm using this data to create a frequency distribution graph.

thanks in advance!
-meat

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 161
Default Calculate FREQUENCY based on criteria...

oops, sorry, Countif cannot work with two criteria, my array formula does.

"Alojz" wrote:

As I wrote elsewhere, I like array formulas.

to count frequency of 10 in 2009, type for instance in cell c10:
=sum((year(a2:a6)=2009)*(b2:b6=10)) then press ctrl+shift+enter

the easiest way is to use Countif formula



"MeatLightning" wrote:

Hi there -
Stumped on this one... I want to calculate frequency for items that
meet a certain criteria. In this case, date. I have a bunch of data that
looks like this:

COL-A | COL-B
1/2/09 | 10
1/6/09 | 13
1/8/09 | 10
10/23/08 | 10
2/3/09 | 10
2/9/09 | 10

I want to calculate the FREQUENCY of COL-B data for items that occur in
2009. In the example above, that would be 4 for "10" and 1 for "13".

I'm using this data to create a frequency distribution graph.

thanks in advance!
-meat

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
Calculate mode based on criteria goofy11 Excel Worksheet Functions 1 November 27th 06 09:55 PM
How do I count frequency based on 2 criteria (including month) RS Excel Worksheet Functions 18 November 24th 06 12:02 PM
Calculate average based on date and other criteria Kycajun Excel Discussion (Misc queries) 3 July 14th 06 10:08 PM
evaluate two cells and calculate based on criteria galiant Excel Worksheet Functions 6 July 10th 06 04:21 PM
calculate the sum based on two different criteria Ken Excel Discussion (Misc queries) 1 May 22nd 05 09:58 AM


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

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"