=COUNTIFS multiple criteria numbers, letters and dates

MrJoosten

Board Regular
Joined
Nov 12, 2016
Messages
118
Hi guys,

Could anyone help me with this issue;

I want to determine if the dates of an combination of product & customer are overlapping each other.

I think im close, but with the following formula I get an error:

=COUNTIFS(C2:D5;">="&C2;C2:D5;"<="&D2;A2:A5;A2;B2:B5;B2)

This is an simple example sheet where I used the formula (product nr in cel A1):
[TABLE="width: 414"]
<tbody>[TR]
[TD]Product nr[/TD]
[TD]Customer[/TD]
[TD]Start week[/TD]
[TD]End week[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5544556[/TD]
[TD]Peter[/TD]
[TD]5[/TD]
[TD]10[/TD]
[TD]#VALUE![/TD]
[/TR]
[TR]
[TD]4455665[/TD]
[TD]Mark[/TD]
[TD]4[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5854545[/TD]
[TD]Mark[/TD]
[TD]7[/TD]
[TD]12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5544556[/TD]
[TD]Peter[/TD]
[TD]6[/TD]
[TD]9[/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col></colgroup>[/TABLE]

Any help or suggestions are welcome.

Thx :)
 
@Aladin Thanks a lot!

=IF(COUNTIFS($A$2:A2,$A2,$B$2:$B2,$B2)>1,IF(COUNTIFS($A$2:$A$5,$A2,$B$2:$B$5,$B2,$C$2:$C$5,"<="&$D2,$D$2:$D$5,">="&$C2)>1,"check discount",""),"")

Works very nice! :)
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,332
Messages
6,171,508
Members
452,407
Latest member
Broken Calculator

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