Countifs Complex

ryan0521

Board Regular
Joined
Dec 7, 2016
Messages
79
Can someone help me to solve this one, I want a formula that will return TRUE or FALSE only if all the following criteria will be met for this DATA.

I want to check if all the data here below:
ABC
CodeQuantityDate
110243/31/2018

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

will have the exact data below:
ABCDE
1CodeQuantityQuantityQuantityDate
21032133/30/2018
31012223/29/2018
41021243/30/2018
51021243/20/2018

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>

But I need to have additional 1 day allowance for date, so exact date or late by 1 day is alright and the quantity of 1st data can be match with any of 3 Quantity from the 2nd table.

Hope you help me.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi,

Not sure if you mean you want to check your second table line by line, or as a whole, as you didn't show sample of results needed, is this what you mean?


Excel 2010
ABCDEF
1CodeQuantityDate
210243/31/2018
3
4
5CodeQuantityQuantityQuantityDate
61032133/30/2018FALSE
71012223/29/2018FALSE
81021243/30/2018TRUE
91021243/20/2018FALSE
Sheet9
Cell Formulas
RangeFormula
F6=AND(A6=A$2,COUNTIF(B6:D6,B$2),OR(E6=C$2,E6=C$2-1))


F6 formula copied down.
 
Upvote 0
Can you show some samples of what you have, and sample results.
 
Upvote 0
Can you show some samples of what you have, and sample results.

Data 1

ABC
CodeQuantityDateRESULT
110243/31/2018TRUE
210333/31/2018TRUE
310413/28/2018FALSE
410523/27/2018FALSE
410523/21/2018TRUE

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

Data 2
ABCDE
1CodeQuantityQuantityQuantityDate
21032133/30/2018
31012223/29/2018
41021243/30/2018
51051243/20/2018

<colgroup><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
This seems to work:


Excel 2010
ABCDEF
1CodeQuantityDate
210243/31/2018TRUE
310333/31/2018TRUE
410413/28/2018FALSE
510523/27/2018FALSE
610523/21/2018TRUE
7
8
9CodeQuantityQuantityQuantityDate
101032133/30/2018FALSE
111012223/29/2018FALSE
121021243/30/2018TRUE
131051243/20/2018FALSE
Sheet21
Cell Formulas
RangeFormula
D2=SUMPRODUCT((A$10:A$13=A2)*(B$10:D$13=B2)*OR(E$10:E$13=C2,E$10:E$13=C2-1))>0
F10=AND(A10=A$2,COUNTIF(B10:D10,B$2),OR(E10=C$2,E10=C$2-1))


Formulas copied down.
 
Upvote 0
This seems to work:

Excel 2010
ABCDEF
1CodeQuantityDate
210243/31/2018TRUE
310333/31/2018TRUE
410413/28/2018FALSE
510523/27/2018FALSE
610523/21/2018TRUE
7
8
9CodeQuantityQuantityQuantityDate
101032133/30/2018FALSE
111012223/29/2018FALSE
121021243/30/2018TRUE
131051243/20/2018FALSE

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet21

Worksheet Formulas
CellFormula
D2=SUMPRODUCT((A$10:A$13=A2)*(B$10:D$13=B2)*OR(E$10:E$13=C2,E$10:E$13=C2-1))>0
F10=AND(A10=A$2,COUNTIF(B10:D10,B$2),OR(E10=C$2,E10=C$2-1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Formulas copied down.

Thank you so much, you help me a lot. God Bless you. :)
 
Upvote 0
Thank you and you're welcome.
 
Upvote 0

Forum statistics

Threads
1,215,457
Messages
6,124,941
Members
449,197
Latest member
k_bs

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