counting and sumproduct formulas

  • Thread starter Thread starter samiam1
  • Start date Start date
S

samiam1

I am attempting to count non-blank cells in one column that have to mee
criteria from another column. I have played with the sumproduc
function but to no avail....can someone assist?

Example following:
Column A represents the Month and Year and Column B represents Cost
incurred. I want to count the number of times a Cost was incurre
during the specific Month/Year. When a cost is not incurred, the cel
remains blank.

Column A Column B
01/2004
01/2004 $25.00

01/2004
02/2004 $15.00
02/2004 $20.00
02/2004

If the formula works correctly, my results would show
01/2004 1
02/2004 2

Please let me know if you have any ideas! :)
Thanks.............
 
Why not take a look at the sub-total function from the Data Menu - it allows
a summary by your date(key) field and a sum, count etc for the data
 
=sumproduct(-(Month(A1:A30)=1),-(Year(A1:A30)=2004),--(B1:B30<>"")
 
I am attempting to have this tally as new information is
entered-foregoing having to manually sort & subtotal. I may be forced
to do so manually, but wanted to explore all options prior to
submitting to manual work.
 
I appreciate all of your help! I was able to figure it out.....Thank
again
Samiam
 
Is the Month and year true dates or just text? If dates use

=SUMPRODUCT(--(A1:A100-DAY(A1:A100)+1=--"2004-01-01"),--(NOT(ISBLANK(B1:B100
))),B1:B100)

if it is text then use

=SUMPRODUCT(--(A1:A100="01/2004"),--(NOT(ISBLANK(B1:B100))),B1:B100)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top