ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SUMPRODUCT help.... (https://www.excelbanter.com/excel-discussion-misc-queries/80907-sumproduct-help.html)

Chip Smith

SUMPRODUCT help....
 
I figured out that the SUMPRODUCT formula would work best in my situation and
it did....however i made a slight error when writing it and now i'm
stuck...the currents formual looks like this...

=SUMPRODUCT(--(MONTH(Data!$G$2:$G$47)=2),--(YEAR(Data!$G$2:$G$47)=2006),--(Data!$D$2:$D$47="Purchased"))

however when dealing with my data, i need it to search between two
dates....for example the date would be anything between Jan 1, 2006 and Jan
20, 2006.WOuld the formual look somehting like this??

=SUMPRODUCT(--(DATE(2006,1,1<Data!$D$2:$D$47<2006,1,20)),--(Data!$D$2:$D$47="Purchased"))

Thank you!

--
--Chip Smith--
MVP Wannabe :)

daddylonglegs

SUMPRODUCT help....
 

You could use

=SUMPRODUCT(--(DATE(2006,1,1)<=Data!$G$2:$G$47),--(DATE(2006,1,20)=Data!$G$2:$G$47),--(Data!$D$2:$D$47="Purchased"))

...or better yet, put your dates in cells, e.g. J2 and K2 and reference
those - makes it easier to change date ranges or use multiple ranges

=SUMPRODUCT(--(J2<=Data!$G$2:$G$47),--(K2=Data!$G$2:$G$47),--(Data!$D$2:$D$47="Purchased"))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=528770


Chip Smith

SUMPRODUCT help....
 
the only problem that i see with that is that each month it will count all
the previous entries...becasue i am using this for each month of the
year...the 21st of the month before to the 20th of the current month all the
way from jan to dec

--
--Chip Smith--
MVP Wannabe :)


"daddylonglegs" wrote:


You could use

=SUMPRODUCT(--(DATE(2006,1,1)<=Data!$G$2:$G$47),--(DATE(2006,1,20)=Data!$G$2:$G$47),--(Data!$D$2:$D$47="Purchased"))

...or better yet, put your dates in cells, e.g. J2 and K2 and reference
those - makes it easier to change date ranges or use multiple ranges

=SUMPRODUCT(--(J2<=Data!$G$2:$G$47),--(K2=Data!$G$2:$G$47),--(Data!$D$2:$D$47="Purchased"))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=528770



daddylonglegs

SUMPRODUCT help....
 

Chip Smith Wrote:
the only problem that i see with that is that each month it will count
all
the previous entries...becasue i am using this for each month of the
year...the 21st of the month before to the 20th of the current month
all the
way from jan to dec


I'm not sure what you mean, it will only count entries between the two
dates specified where column D is "purchased".....

If you want you could put formulas in J2 and K2 to change the dates
automatically each month, on what date do you switch from 21st february
- 20th March and start looking at 21st March - 20th April?


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=528770



All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com