Thread: Need a Function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Need a Function

If I understand you correctly you are looking for the total number of days
for each item

'Count of dates excluding the starting date
=SUMPRODUCT((A1:A10="apples")*(C1:C10-B1:B10))

'Count of dates including the starting date
=SUMPRODUCT((A1:A10="apples")*(C1:C10-B1:B10+1))

If this post helps click Yes
---------------
Jacob Skaria


"Dorydoodle" wrote:

I have an existing spreadsheet that I wish to use to make an audit sheet with
in the same workbook. However, I have the items in numerical order rather
than descriptive order. In other words, the column name is for produce but
the each item number has a different type of apple or orange. I cannot
reorganize the groups to make formatting easier for the new sheet. I need the
types seperated for received date and spoil date. What is a function I could
use for the new worksheet to keep the date counts current for each type of
produce in column A? The best one I found was a DCOUNTA function but I need
specific data.

Example: Column A Column B Column C
Apples 02/03/09 02/05/09
Oranges 01/02/09 01/07/09
Bananas 02/03/09 02/07/09
Apples 02/02/09 02/04/09

What is a formula or function I could use to get all the info for the apples
on a new worksheet that would stay updated? (All dates equal to the value of
1)

--
Dorydoodle