Compare more conditions from 2 tables and write right value

Tibor GRENDEL

New Member
Joined
Feb 12, 2022
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Dear all,
I need update old price list with new prices. Old pricelist can´t to replace simply with new.

I need compare poduct_code1 (column A in table A2:F16) with product_code2 (column L in table L3:N23).
If table L3:N23 obtain A is in L I have to compare column D with column M and if D=M I have to write responsible value from N to F.
Step 1: compare value from column A:A with L:L
Step 2: if A=L compare D with M, if D=M write responsible value from N to F
Step 3: if A # L write value "No contain" to F

Test subor s par polozkami_2.xlsm
ABCDEFGHIJKLMN
1product_code1old_date_start1old_date_end2MOQ1old_price1new_price1=new_price2 depending by product_code2 and MOQ2
21011272021-01-012021-12-311980No contain I need paste value from table L3:N23 when A = L and to D=M then F=Nproduct_code2MOQ2new_price2
31011272021-01-012021-12-315560No containexample10109011023,58
41011312021-01-012021-12-311400780example1011001806,42
51011312021-01-012021-12-31535050example1011111883,89
61011332021-01-012021-12-3119931023example10112711000
71011332021-01-012021-12-315929957example1011275780
81011392021-01-012021-12-3111209,631011311600
91011402021-01-012021-12-3111306,62101131550
104050852021-01-012021-12-31311910113311023
114050862021-01-012021-12-3111291011335957
124050862021-01-012021-12-31312210115911647
134050872021-01-012021-12-311183,3410115941618
144050902021-01-012021-12-31119910116011594
154050942021-01-012021-12-31112610116041618
164050952021-01-012021-12-31118210116212021,54
1710116312021,54
182014351212
192014355167
202015231201
2120152340137
22210162161,6
23210162549,28
Sheet1
 
I am going to have to assume your example is wrong. eg you have 780 against 1001133 while in the table to the right it is against 1001127.
Also No contain on the first 2 lines looks wrong.

So unlesss I am misunderstanding the logic. Try this:

20220212 Lookup multiple criteria.xlsx
ABCDEFGHIJKLMN
1product_code1old_date_start1old_date_end2MOQ1old_price1new_price1=new_price2 depending by product_code2 and MOQ2
21011271/01/202131/12/202119801000 I need paste value from table L3:N23 when A = L and to D=M then F=Nproduct_code2MOQ2new_price2
31011271/01/202131/12/20215560780example10109011023.58
41011311/01/202131/12/20211400600example1011001806.42
51011311/01/202131/12/2021535050example1011111883.89
61011331/01/202131/12/202119931023example10112711000
71011331/01/202131/12/20215929957example1011275780
81011391/01/202131/12/202111209.63No contain1011311600
91011401/01/202131/12/202111306.62No contain101131550
104050851/01/202131/12/20213119No contain10113311023
114050861/01/202131/12/20211129No contain1011335957
124050861/01/202131/12/20213122No contain10115911647
134050871/01/202131/12/20211183.34No contain10115941618
144050901/01/202131/12/20211199No contain10116011594
154050941/01/202131/12/20211126No contain10116041618
164050951/01/202131/12/20211182No contain10116212021.54
1710116312021.54
182014351212
192014355167
202015231201
2120152340137
22210162161.6
23210162549.28
Answer
Cell Formulas
RangeFormula
F2:F16F2=IFNA(LOOKUP(2,1/(($L$3:$L$23=A2)*($M$3:$M$23=D2)),$N$3:$N$23),"No contain")
 
Upvote 0
Solution

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