Sum Product

WDB2

Board Regular
Joined
Apr 14, 2008
Messages
87
I have the following formula which is working:

=SUMPRODUCT(--(Sheet2!D:D=Sheet1!B2),(--(Sheet2!F:F="Red")))

I want to add in another argument to say that sheet 2 column L must be greater than today. How do I do this?

Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I tried to put something alone the lines of:

=SUMPRODUCT(--(Sheet2!D:D=Sheet1!B2),(--(Sheet2!F:F="Red"),(--(Sheet2!L:L=<TODAY) but it returned 0. I also changed "<TODAY" to 01/11/2011 which definitely should have a count but it still returned 0.
 
Upvote 0
I have the following formula which is working:

=SUMPRODUCT(--(Sheet2!D:D=Sheet1!B2),(--(Sheet2!F:F="Red")))

I want to add in another argument to say that sheet 2 column L must be greater than today. How do I do this?

Thanks

Since you are on a recent version of Excel...

=COUNTIFS(Sheet2!D:D,B2,Sheet2!F:F,"Red",Sheet2!L:L,">"&TODAY())

See also your other thread on the same issue.
 
Upvote 0
Many thanks. Works well. If I want to copy the formula to another column to effectively do the same but for dates in the past, what do I replace?

Thanks again
 
Upvote 0
Many thanks. Works well.

You are welcome. Thanks for providing feedback.

If I want to copy the formula to another column to effectively do the same but for dates in the past, what do I replace?...

Not sure what you are exactly after...

An example:

Let C2:D2 house a pair of criterion dates with C <= B2. Now invoke:

=COUNTIFS(Sheet2!D:D,B2,Sheet2!F:F,"Red",Sheet2!L:L,">="&C2,Sheet2!L:L,"<="&D2)

The count will now apply to a date range between C2 and D2 inclusive. Does this help?
 
Upvote 0
I just really want the same formula as before but instead of looking at dates in the future, I want to look at dates prior to today.

=COUNTIFS(Sheet2!D:D,B2,Sheet2!F:F,"Red",Sheet2!L:L,">"&TODAY())

Thanks again.
 
Upvote 0
I just really want the same formula as before but instead of looking at dates in the future, I want to look at dates prior to today.

=COUNTIFS(Sheet2!D:D,B2,Sheet2!F:F,"Red",Sheet2!L:L,">"&TODAY())

Thanks again.

Would you provide such a date?
 
Upvote 0

Forum statistics

Threads
1,224,560
Messages
6,179,520
Members
452,923
Latest member
JackiG

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?

Disable AdBlock

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
Back
Top