Compare dates in 2 lists and check if falls in same month with criteria

xetrivity

New Member
Joined
May 15, 2017
Messages
3

DATE
NO
AMOUNT
DATE
NO
QTY
AMOUNT
CHECK IF MONTH IS MATCHING
03/01/2016
389
250
03-01-2016
398
3
750
YES
03/01/2016
389
250
03-01-2016
390
1
250
YES
03/01/2016
389
250
03-01-2016
574
2
3900
YES
03/01/2016
390
250
04/02/2016

<colgroup><col width="64"></colgroup><tbody>
</tbody>
410
1
500
NO
03/01/2016
574
1950
04/02/2016

<colgroup><col width="64"></colgroup><tbody>
</tbody>
575
2
3900
NO
03/01/2016574
1950
05/01/2016

<colgroup><col width="64"></colgroup><tbody>
</tbody>
460
1
250
YES
03/01/2016
410
500
05/01/2016

<colgroup><col width="64"></colgroup><tbody>
</tbody>
391
4
1000
YES
03/01/2016575
1950
05/01/2016

<colgroup><col width="64"></colgroup><tbody>
</tbody>
392
1
250
YES
03/01/2016
575
1950
03/01/2016640
250
03/01/2016
391
250
03/01/2016391
250
03/01/2016
391
250
03/01/2016
391
250
03/01/2016
392
250

<tbody>
</tbody>

Need help on above condition. i want to check with comparing number first and if it matches check if they fall in same month and return a string where it says yes or no.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Give this a try.
Code:
=IF(DATEDIF(A1,E1,"m")>0,"no","Yes")

It is working but you are checking only dates. we have to check the number column also because the table on the left will have other months also. it will not work then.
 
Upvote 0
Would some something like this work?
Code:
{=IFERROR(IF(INDEX($A$3:$B$17,MATCH(1,($B$3:$B$17=F3)*($A$3:$A$17=E3),0),1)=E3,"Yes","No"),"No")}

Use SHIFT+CTL+ENTER
 
Upvote 0
it works great. You are a genius. :)
although this checks the dates exactly not month. but worked around with helping columns.
Thank you.
 
Upvote 0
Hi,
Here is the one to check if it is in the same month.
Code:
=IF(AND(SUMPRODUCT(--(MONTH(E2)=MONTH($A$2:$A$16))),INDEX($B$2:$B$16,MATCH(F2,$B$2:$B$16),0),1),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,214,986
Messages
6,122,611
Members
449,090
Latest member
vivek chauhan

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