-
try weeknum() and sumproduct
Not sure if this will work in your formulas.
Try Weeknum()
it is part of the add-in for Analysis ToolPak
I use it where there is a date in column A,
Column A is a named range "jobdate"
and another column in same row put =weeknum(A1) and fill down
' this is a helper column
this helper row is named wknum
in another formula I refernece the result with sumproduct
=sumproduct(--(data1=value),--(data2=value2))
my actual code looks like this:
=SUMPRODUCT(--(Pass="x"),--(JobDate=WEEKNUM(WkStart)))
pass, jobdate and wkstart are named ranges
data1 is the range you are looking in
value 1 is what you limit the results by
if you have dats in column A from jan to aug
- the valu could be any month that falls in that range...
The true result will then compare the second criteria
Or you can just use sumproduct without the helper column
You have to name a cell as StartDate and EndDate
set up your sheet with columns where you enter a date,
- and name the range "JobDate"
in a cell you want the sum or result type:
=sumproduct(--(JobDate=>startdate),--(jobdate=<stopdate),--(check=value))
I have a few posts with this sumproduct and weeknum()
look up under mperrah
lucas, mdmcillop and charlize have all helped with this as well.
Mark
Last edited by mperrah; 07-07-2007 at 02:17 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules