I have put together the following code (with help from this and another forum):
![]()
Dim Res1 As Integer Res1 = Worksheets("sheet1").Evaluate("=sumproduct(--(am1:am30000>=date(2009,08,01)),--(am1:am30000>date(2009,09,01)),BN1:BN30000)") MsgBox Res1
it seems to work (by which i mean it runs error free). However the number it calculates is not correct.
I came up with this code to do the following:
Check for a date between 2 dates (08/01/09 and 09/01/09 for example).
Then add up and return all the values in BN1:BN30000 for any rows that have a date matching that query.
However what the code above seems to give me is anything greater that 9/1/09
thanks
Bookmarks