Index match with an additional condition - list comparison

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
886
Office Version
  1. 365
Platform
  1. Windows
I am not sure how to even begin modifying the below formula to achieve what I require.

I have a formula in column B that returns a result of No if there is no match in list 3, however I want it to also provide a Yes result if a record with the same date appears in both List 1 and List 2

I would like it that record U-39 returned a "Yes" since the record + Date combination appears in List 1 and List 2

Is it possible to modify the formula to do this?

Stamp Signature Spreadsheet Uniflyte.xlsx
ABCDEFGHIJKL
1List 1ReassignedDATEList 2 - BrokenDATEList 3Available
2UI-30No6-Jun-16UCI-7014-Aug-19UCI-059Yes
3UI-33No26-May-16UI 4822-Dec-17UCI-064Yes
4UI-39No15-Mar-21UI 501-Jun-17UCI-072Yes
5UI-41No3-Sep-20UI-2929-Nov-17UCI-074Yes
6UI-42No12-Jul-19UI-3915-Mar-21UCI-076Yes
7UI-43No8-Jun-18UI-579-Jan-20UCI-077Yes
8UI-6329-Nov-17UCI-080Yes
9UCI-082Yes
10UCI-083Yes
11UCI-084Yes
12UCI-086Yes
13UCI-087Yes
14UCI-088Yes
15UCI-089Yes
16UCI-090Yes
17UCI-092Yes
18UCI-73Yes
19UI 49Yes
20UI-25Yes
21UI-27Yes
22UI-31Yes
23UI-32Yes
24UI-40Yes
25UI-45Yes
26UI-5Yes
27UI-50Yes
28UI-57Yes
29UI-58Yes
30UI-62Yes
31UI-65Yes
32UI-7Yes
33UI-92Yes
Sheet1
Cell Formulas
RangeFormula
B2:B7B2=IF(A2<>"",IFERROR(INDEX(L:L,MATCH(A3,K:K,FALSE)),"No"),"")
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Why does your formula look at A3 in the MATCH when it seems to me you would be looking at A2 ??

Would this work in B2 (and filled down)?

Code:
=IF(A2<>"",IF(OR((A2=$F$2:$F$8)*(C2=$G$2:$G$8)),"YES",IFERROR(INDEX(L:L,MATCH(A2,K:K,FALSE)),"No")),"")
 
Last edited:
Upvote 0
How about
Excel Formula:
=IF(A2<>"",IF(C2=IFNA(INDEX($G$2:$G$8,MATCH(A2,$F$2:$F$8,0)),0),"Yes",IFERROR(INDEX(L:L,MATCH(A2,K:K,FALSE)),"No")),"")
 
Upvote 0
Solution
How about
Excel Formula:
=IF(A2<>"",IF(C2=IFNA(INDEX($G$2:$G$8,MATCH(A2,$F$2:$F$8,0)),0),"Yes",IFERROR(INDEX(L:L,MATCH(A2,K:K,FALSE)),"No")),"")
On my test sheet both formulas worked fine however on the real document I am getting a circular reference. To be honest I cannot see what is tripping it up and hope either of you might be willing to see where I made an error. I apologize for the complexity

Stamp Signature Spreadsheet Uniflyte.xlsx
ABCDEFGHIJKL
1Stamps Labeled as ReturnedStamps Reassigned (Y/N)Date Stamp ReturnedStamps Available for Issue (TRUE/FALSE)Stamps in 6 month Dormant Cycle (TRUE/FALSE)Stamp Broken and available for re-orderStamps listed as LOSTStamps Re-assigned with no Return Date
2UCI 044No6-Oct-16TRUEFALSEUCI-7014-Aug-19UCI 043UCI-059Yes
3UCI 054No21-Jul-16TRUEFALSEUI 4822-Dec-17UCI 045UCI-064Yes
4UCI 055No30-Jun-20TRUEFALSEUI 501-Jun-17UCI 051UCI-072Yes
5UCI 056No2-Apr-22FALSETRUEUI-2929-Nov-17UCI 060UCI-074Yes
6UCI 058No29-Nov-17TRUEFALSEUI-3915-Mar-21UCI 061UCI-076Yes
7UCI 064No29-Sep-17TRUEFALSEUI-579-Jan-20UCI-049UCI-077Yes
8UCI 62No27-Jun-16TRUEFALSEUI-6329-Nov-17UCI-052UCI-080Yes
9UCI-044No10-Jun-20TRUEFALSEUCI-053UCI-082Yes
10UCI-046No1-Jan-21TRUEFALSEUCI-055UCI-083Yes
11UCI-061No28-Aug-20TRUEFALSEUCI-058UCI-084Yes
12UCI-065No9-Nov-18TRUEFALSEUCI-068UCI-086Yes
13UCI-067No2-Feb-20TRUEFALSEUCI-071UCI-087Yes
14UCI-074Yes   UCI-077UCI-088Yes
15UCI-076Yes   UCI-078UCI-089Yes
16UCI-079No15-Sep-20TRUEFALSEUCI-079UCI-090Yes
17UCI-081No17-May-21TRUEFALSEUCI-082UCI-092Yes
18UCI-083Yes   UCI-44UCI-73Yes
19UCI-084Yes   UCI-69UI 49Yes
20UCI-085No29-Nov-17TRUEFALSEUCI-75UI-25Yes
21UCI-091No29-Nov-17TRUEFALSEUI 53UI-27Yes
22UI 51No2-Jan-17TRUEFALSEUI-1UI-31Yes
23UI 55No28-Oct-16TRUEFALSEUI-20UI-32Yes
24UI 60No14-Mar-17TRUEFALSEUI-22UI-40Yes
25UI-2No14-Nov-19TRUEFALSEUI-23UI-45Yes
26UI-22No14-Apr-21TRUEFALSEUI-33UI-5Yes
27UI-25Yes   UI-38UI-50Yes
28UI-27Yes   UI-41UI-57Yes
29UI-30No6-Jun-16TRUEFALSEUI-43UI-58Yes
30UI-33No26-May-16TRUEFALSEUI-44UI-62Yes
31UI-39No15-Mar-21TRUEFALSEUI-52UI-65Yes
32UI-41No3-Sep-20TRUEFALSEUI-56UI-7Yes
33UI-42No12-Jul-19TRUEFALSEUI-61UI-92Yes
34UI-43No8-Jun-18TRUEFALSEUI-7 
35UI-45Yes   UI-78 
36UI-47No28-Mar-17TRUEFALSE 
37UI-5Yes    
38UI-51No29-Nov-17TRUEFALSE 
39UI-54No22-Mar-17TRUEFALSE 
40UI-55No29-Nov-17TRUEFALSE 
41UI-57Yes    
42UI-59No9-Oct-19TRUEFALSE 
43UI-61No7-Jul-20TRUEFALSE 
44UI-62Yes    
45UI-68No19-Nov-21FALSETRUE 
Stamp Availability Calc
Cell Formulas
RangeFormula
A2:A45A2=SORT(UNIQUE(FILTER(Table10[STAMP NO.],Table10[STATUS]="RETURNED")))
B2:B45B2=IF(A2<>"",IFERROR(INDEX(L:L,MATCH(A2,K:K,FALSE)),"No"),"")
C2:C45C2=IF(B2="No",XLOOKUP(MAX(Table10[DATE OF RETURN/LOST]),(Table10[STAMP NO.]='Stamp Availability Calc'!A2)*Table10[DATE OF RETURN/LOST],Table10[DATE OF RETURN/LOST],,-1),"")
D2:D45D2=IFERROR(DATEDIF(C2,TODAY(),"m")>=6, C2)
E2:E45E2=IFERROR(DATEDIF(C2,TODAY(),"m")<6, C2)
F2:F8F2=SORT(UNIQUE(FILTER(Table10[STAMP NO.],(Table10[STATUS]="BROKEN")*(Table10[DATE OF RETURN/LOST]>0))))
H2:H35H2=SORT(UNIQUE(FILTER(Table10[STAMP NO.],(Table10[STATUS]="LOST"))))
K2:K33K2=UNIQUE(FILTER(Table10[STAMP NO.],Table10[DATE OF RETURN/LOST]=""))
G2:G8G2=XLOOKUP(MAX(Table10[DATE OF RETURN/LOST]),(Table10[STAMP NO.]='Stamp Availability Calc'!F2)*Table10[DATE OF RETURN/LOST],Table10[DATE OF RETURN/LOST],,-1)
L2:L45L2=IF(K2<>"","Yes","")
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F:GCelldoes not contain a blank value textNO
E:ECelldoes not contain a blank value textNO
D:DCelldoes not contain a blank value textNO
 
Upvote 0
You are getting the circular reference because the formula in B2 needs to look at C2, but the formula in C2 is looking at B2
 
Upvote 0
You are getting the circular reference because the formula in B2 needs to look at C2, but the formula in C2 is looking at B2
Thank you very much! I have fixed this and the formulas work great.

Thank you again :giggle:
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
I do have another question regarding another modification to a formula on that sheet but I will make a new post. Thank you again :)
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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