Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Greg D
 
Posts: n/a
Default Counting when both match

Here's where I need some help. I have a spreedsheet that will list off some
companyies like Company A, Company B. The next column has dates, like
1/25/06, 2/1/06.

The formula needs to only count how many times that Company A has a date
between 1/1/06 and 1/31/06. Then I'll repeat the formula for Company B. The
2 numbers have to match the total # of line entries in the worksheet.

Please help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Counting when both match

Try something like this:

With your list in A1:B100
Whe
Col_A contains comany names
Col_B contains dates

D1: (start date)
E1: (end date)

F1: Company_A
F2: Company_B

G1: =SUMPRODUCT(($A$1:$A$100=F1)*($B$1:$B$100=$D$1)*( $B$1:$B$100<=$E$1))
Copy that formula down to G2

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Greg D" wrote:

Here's where I need some help. I have a spreedsheet that will list off some
companyies like Company A, Company B. The next column has dates, like
1/25/06, 2/1/06.

The formula needs to only count how many times that Company A has a date
between 1/1/06 and 1/31/06. Then I'll repeat the formula for Company B. The
2 numbers have to match the total # of line entries in the worksheet.

Please help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Counting when both match

Assume your main data is in columns A and B, and suppose it covers row
1 to row 100. Use D1 for the start date (1/1/06), D2 for the end date
(1/31/06) and enter this formula in D3:

=SUM(IF(($A$1:$A$100="CompanyA")*($B$1:$B$100=D1) *($B$1:$B$100<=D2),1,0))

This is an array formula, so once you have typed it in (or when you
subsequently edit it) you must use CTRL-SHIFT-ENTER instead of just
ENTER. If you do this correctly then Excel will wrap curly braces { }
around the formula - you must not type these yourself.

The formula will count the number of times Company A exists in column A
with dates in column B which are between (and including) the dates in
D1 and D2. Change it to "CompanyB" for that count. If you have dates
which are outside the range, then the two counts will not match the
total number of entries.

Hope this helps.

Pete

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Greg D
 
Posts: n/a
Default Counting when both match

Thanks it worked.

"Pete_UK" wrote:

Assume your main data is in columns A and B, and suppose it covers row
1 to row 100. Use D1 for the start date (1/1/06), D2 for the end date
(1/31/06) and enter this formula in D3:

=SUM(IF(($A$1:$A$100="CompanyA")*($B$1:$B$100=D1) *($B$1:$B$100<=D2),1,0))

This is an array formula, so once you have typed it in (or when you
subsequently edit it) you must use CTRL-SHIFT-ENTER instead of just
ENTER. If you do this correctly then Excel will wrap curly braces { }
around the formula - you must not type these yourself.

The formula will count the number of times Company A exists in column A
with dates in column B which are between (and including) the dates in
D1 and D2. Change it to "CompanyB" for that count. If you have dates
which are outside the range, then the two counts will not match the
total number of entries.

Hope this helps.

Pete


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
Match Index cjjoo Excel Worksheet Functions 3 October 25th 05 09:33 AM
Counting Match Pairs In Rows bmb2200 Excel Worksheet Functions 4 August 25th 05 03:35 AM
Look up data in colum a and find match in colum b Chris(new user) Excel Discussion (Misc queries) 1 March 22nd 05 01:41 PM
Find a match that;s not exact Phyllis Excel Worksheet Functions 0 November 8th 04 08:12 PM
Vlookup, Index & Match Phyllis Excel Worksheet Functions 1 November 8th 04 06:11 PM


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