Counting Problem - Number of Entries for Several Time Periods

mz-ler

Registered User.
Local time
Today, 11:55
Joined
Feb 21, 2005
Messages
16
Hi - I don't seem to be able to find a solution which should (I think) be simple.

I want to find out how many sales occured between two points in time. The problem now is that I do not only habe one sales period but several. E.g. i have 5 periods each with a start and an end date - In a separate table there are a couple of hundred sales. Is there a way to simply count for each period without doing COUNTIF with some OR conditions (because I have a lot more than those five periods to cover).

Help is very much appreciated!
Thanks
 
I'd guess that you need to use sumproduct. I'd have a place to define your date ranges. For example, you define your ranges in Row 1 and Row 2 (start, end) where A1 is the start date for period one, B1 for period two, etc., and A2 would be the end date of the period. From there you use sumproduct like this: =SUMPRODUCT((([date range]>=[start date])*([date range]<=[end date]))*([sales range]))

Does this make sense? There's probably a cleaner way of doing this, but this is all I got.
 

Users who are viewing this thread

Back
Top Bottom