SUMIFS based on text criteria between selected dates

samlofty

New Member
Joined
Feb 28, 2017
Messages
3
=SUMIFS($K$17:$L$1000,$G$17:$G$1000,"win**",$B$17:$B$1000,">="&$R$663,$B$17:$B$1000,"<="&$R$664)

K:L range I want to sum in [h]:mm
G Text condition
B date range. I can select dates in R663 and R664

I have tried the text condition (G) at the end but both returns #VALUE!. Where have I gone wrong?

Thanks in anticipation
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi & welcome to MrExcel.
All the ranges in a Sumifs need to be the same size, but your initial range is 2 columns & the others are 1 column.
What does col G contain?
 
Upvote 0
K:L range I want to sum

Why K and L?
That is why the error. If you have the cells combined, use only K.


=SUMIFS($K$17:$K$1000,$G$17:$G$1000,"win**",$B$17:$B$1000,">="&$R$663,$B$17:$B$1000,"<="&$R$664)
 
Upvote 0
Why K and L?
That is why the error. If you have the cells combined, use only K.


=SUMIFS($K$17:$K$1000,$G$17:$G$1000,"win**",$B$17:$B$1000,">="&$R$663,$B$17:$B$1000,"<="&$R$664)
Many thanks. The data to be summed is in both Columns K and L. I'll adjust so that I get both.
 
Upvote 0
Could you answer my question from post#2?
 
Upvote 0
If you are going to have a single column for the text "G" and a single column for the date, then try

=SUMIFS($K$17:$K$1000,$G$17:$G$1000,"win*",$B$17:$B$1000,">="&$R$663,$B$17:$B$1000,"<="&$R$664)+
SUMIFS($L$17:$L$1000,$G$17:$G$1000,"win*",$B$17:$B$1000,">="&$R$663,$B$17:$B$1000,"<="&$R$664)
 
Upvote 0
Ok, in that case you can use sumproduct.
=SUMPRODUCT(($G$17:$G$1000="win**")*($B$17:$B$1000>=A16)*($B$17:$B$1000<=B16)*($K$17:$L$1000))

I wasn't sure if the asterix were being used as a wild card, or not.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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