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
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$100gt;=$D$1)*( $B$1:$B$100lt;=$E$1))
Copy that formula down to G2
Is that something you can work with?
***********
Regards,
Ron
XL2002, WinXP-Proquot;Greg Dquot; wrote:
gt; Here's where I need some help. I have a spreedsheet that will list off some
gt; companyies like Company A, Company B. The next column has dates, like
gt; 1/25/06, 2/1/06.
gt;
gt; The formula needs to only count how many times that Company A has a date
gt; between 1/1/06 and 1/31/06. Then I'll repeat the formula for Company B. The
gt; 2 numbers have to match the total # of line entries in the worksheet.
gt;
gt; Please help
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=quot;CompanyAquot;)*($B$1:$B$100gt;=D1) *($B$1:$B$100lt;=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 quot;CompanyBquot; 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.
PeteThanks it worked.
quot;Pete_UKquot; wrote:
gt; Assume your main data is in columns A and B, and suppose it covers row
gt; 1 to row 100. Use D1 for the start date (1/1/06), D2 for the end date
gt; (1/31/06) and enter this formula in D3:
gt;
gt; =SUM(IF(($A$1:$A$100=quot;CompanyAquot;)*($B$1:$B$100gt;=D1) *($B$1:$B$100lt;=D2),1,0))
gt;
gt; This is an array formula, so once you have typed it in (or when you
gt; subsequently edit it) you must use CTRL-SHIFT-ENTER instead of just
gt; ENTER. If you do this correctly then Excel will wrap curly braces { }
gt; around the formula - you must not type these yourself.
gt;
gt; The formula will count the number of times Company A exists in column A
gt; with dates in column B which are between (and including) the dates in
gt; D1 and D2. Change it to quot;CompanyBquot; for that count. If you have dates
gt; which are outside the range, then the two counts will not match the
gt; total number of entries.
gt;
gt; Hope this helps.
gt;
gt; Pete
gt;
gt;
- May 27 Tue 2008 20:44
Counting when both match
close
全站熱搜
留言列表
發表留言