Say column A contains a list of Dates and Times (so the serial number will have something after the decimal)
Column B a list of products
How do I do a countif that works out how many of a given product were sold on a given day?
Thanks
Say column A contains a list of Dates and Times (so the serial number will have something after the decimal)
Column B a list of products
How do I do a countif that works out how many of a given product were sold on a given day?
Thanks
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
BD,
Are you talking formula or code?
my site: www.ecboardco.com
was built w/ a majority of the assistance from the board members here... thanks VBAX.
Just because I see something, doesn't mean that what's actually happening is what I see.
You don't get from 0-90 by standing still!
Formula please. I like formulaeOriginally Posted by YellowLabPro
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
Formula:
=SUMPRODUCT(--(INT($A$1:$A$100)=INT(DATE(2007,9,21))))
for example.
Regards,
Rory
Microsoft MVP - Excel
The second INT is a tad redundant.Originally Posted by rory
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
But what's a tad between friends?
Regards,
Rory
Microsoft MVP - Excel
Thanks! And where do I put the product match into the formula?
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
=SUMPRODUCT(--(INT($A$1:$A$100)=DATE(2007,9,21)),--(B1:B100="product"))
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
A tad too much.Originally Posted by rory
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
=SUMPRODUCT((INT($A$1:$A$100)=DATE(2007,9,21))*($B$1:$B$100="Product name"))
You can replace the date and product name with cell references containing the values you want.
Regards,
Rory
Microsoft MVP - Excel
Thanks Gentlemen.
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
Same question just in another way?
If i have a list of data and a template with formulas in to pull info through...
I would like to have a countif and sumif axample if i can search between two seperate date???
=SUMPRODUCT(--(rng_date>=--"2007-01-01"),--(rng_date)<="2007-02-01"))
to count them
=SUMPRODUCT(--(rng_date>=--"2007-01-01"),--(rng_date)<="2007-02-01"),rng_amount)
to sum them
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
If your start and end date criteria are in C1 and d1, then:
Count: =SUMPRODUCT(($A$1:$A$100>=$C$1)*($A$1:$A$100<=$D$1))
Sum (of F): =SUMPRODUCT(($A$1:$A$100>=$C$1)*($A$1:$A$100<=$D$1)*$F$1:$F$100)
Regards,
Rory
Microsoft MVP - Excel
Is this 'Tid for Tad' ?Originally Posted by xld
2+2=9 ... (My Arithmetic Is Mental)
what dose the "--" do in this function? i have never seen functions using this
The double negatives:
To force Excel to coerce the booleans appropriately, two negative signs are added to the formula. Excel negates the result, then negates it again which is enough to make it work.
http://www.dailydoseofexcel.com/arch...rray-formulas/
my site: www.ecboardco.com
was built w/ a majority of the assistance from the board members here... thanks VBAX.
Just because I see something, doesn't mean that what's actually happening is what I see.
You don't get from 0-90 by standing still!
thanks, thats good to know
See http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed explanation.Originally Posted by figment
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber