# Add DATE range in a SUMPRODUCT formula

#### tvagge

##### New Member
Hi,I have this formula:
=SUMPRODUCT(SUBTOTAL(3,OFFSET('ANALYSIS'!\$E\$1:\$E\$8865,ROW('ANALYSIS'!\$E\$1:\$E\$8865)-MIN(ROW('ANALYSIS'!\$E\$1:\$E\$8865)),,1))*('ANALYSIS'!\$E\$1:\$E\$8865=B2))
In my worksheet, I also have a column D, which contains dates.
Is it possible to add a date range (e.g Sep.01 - Sep.30) in the above formula ,so I can filter more my results ?

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
try this: =SUMPRODUCT(SUBTOTAL(3,OFFSET('ANALYSIS'!\$E\$1:\$E\$8865,ROW('ANALYSIS'!\$E\$1:\$E\$8865)-MIN(ROW('ANALYSIS'!\$E\$1:\$E\$8865)),,1))*('ANALYSIS'!\$E\$1:\$E\$8865=B2)*('ANALYSIS'!\$d\$1:\$d\$8865>=date(2016,9,1)*('ANALYSIS'!\$d\$1:\$d\$8865<=date(2016,9,30))

Well, this gives me a #N/A error...

Are they real dates? Sep.01 looks like text if the dot is there.

What does =ISNUMBER(A1) give you where A1 is changed to one of the cells with a date in it?

Last edited:
It gives me TRUE value. Yes, they are real dates.

Hi guys,

I am still struggling on that, no solution found by me yet... Any other ideas ? I would be gratefull...

Looks to me theres an issue with the formula you were given with bracket placement. See if this works:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(ANALYSIS!\$E\$1:\$E\$8865,ROW(ANALYSIS!\$E\$1:\$E\$8865)-MIN(ROW(ANALYSIS!\$E\$1:\$E\$8865)),,1))*(ANALYSIS!\$E\$1:\$E\$8865=B2)*(ANALYSIS!\$D\$1:\$D\$8865>=DATE(2016,9,1))*(ANALYSIS!\$D\$1:\$D\$8865<=DATE(2016,9,30)))

OK, it's working now! Thank you very much for the help!

Last edited:

Replies
12
Views
1K
Replies
3
Views
228
Replies
1
Views
328
Replies
1
Views
418
Replies
5
Views
388

1,196,254
Messages
6,014,279
Members
441,811
Latest member
Peco73267326

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Which adblocker are you using?

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back