Very simple and easy question: - How to use Indirect Function + Xlookup with 2 Criteria?

Lacan

Board Regular
Joined
Oct 5, 2016
Messages
163
Office Version
  1. 365
Platform
  1. Windows
Hello Guys,

Without VBA, how to use Indirect Function + Xlookup with 2 Criteria?
With the reference month in cell in C3 and reference D7 want to fill data in range C9:J9 accordingly.
In order to help just gave in the sheet 2 different examples accordingly what it has to go in column C8:J9.
All the help is highly appreciated.🙌🙌🙏🙏👍👍
Any question feel free to ask

Can you give a hand?🍺🍺
Thank you very much.

Indirect Function + Xlookup_V3.xlsx
BCDEFGHIJKLMNOPQRSTUVWXY
1
2
3JAN
4
5
6
7299 Lx - Amadora (MÁgua - Sul)hmR Region Values MTH Rank PRDMTH Rank MKTMTH Rank MSMarket MTH Feb-23Abc MTH Feb-23Market PYG MTH %Market PYG MTH absAbc PYG MTH %Abc PYG MTH absAbc MS MTH Feb-22Abc MS MTH Feb-23Abc Var MS (p.p.) PY MTH
8TOTAL5 853 190112 4542,3%133 2223,4%3 6741,90%1,92%0,02
9299 Lx - Amadora (MÁgua - Sul)14255108 7803 334-2,0%-2 228-8,2%-2983,27%3,06%-0,21
10300 Lx - Amadora (MÁgua - Norte)222616107 5191 910-2,8%-3 116-1,4%-281,75%1,78%0,03
11301 Lx - Amadora (Venteira)15423281 9533 3218,2%21 328-8,3%-2991,39%1,18%-0,21
12*Accordingly with JAN in cell C3 and with 299 Lx - Amadora (MÁgua - Sul) in cell D7 the results should be302 Lx - Amadora (Alfragide, ÁLivres)6811251 0055 7761,3%3 21025,2%1 1631,86%2,30%0,44
13303 Lx - Amadora (Falagueira, VNova)232715103 3141 8615,4%5 3088,8%1511,74%1,80%0,06
14299 Lx - Amadora (MÁgua - Sul)304 Lx - Amadora (ESol)101614190 3523 8461,9%3 45818,1%5901,74%2,02%0,28
15Market MTH Jan-23Abc MTH Jan-23Market PYG MTH %Market PYG MTH absAbc PYG MTH %Abc PYG MTH absAbc MS MTH Jan-23Abc Var MS (p.p.) PY MTH308 Lx - Lisboa (Benfica - Sul)9244110 8323 9662,1%2 253-13,3%-6074,21%3,58%-0,63
16117 334 €3 672 €-1,1%-1 253 €0,8%30 €3,13%0,06309 Lx - Lisboa (Benfica - Norte)5213307 4376 3208,5%24 07721,6%1 1241,83%2,06%0,22
17310 Lx - Lisboa (Estrela)262220112 7401 5533,5%3 8228,2%1171,32%1,38%0,06
18311 Lx - Lisboa (COurique - Oeste)291333197 9711 1088,0%14 7492,2%240,59%0,56%-0,03
19312 Lx - Lisboa (COurique - Este)33322960 66946516,8%8 72811,7%490,80%0,77%-0,03
20*Accordingly with FEB in cell C3 and with 299 Lx - Amadora (MÁgua - Sul) in cell D7 the results should be313 Lx - Lisboa (Misericórdia)1928997 6952 34519,2%15 70650,0%7821,91%2,40%0,49
21314 Lx - Lisboa (SAntónio - Oeste)28292194 9191 2749,6%8 3520,5%61,47%1,34%-0,12
22299 Lx - Amadora (MÁgua - Sul)315 Lx - Lisboa (SAntónio - Este)2131667 8731 932-3,4%-2 356-35,6%-1 0674,27%2,85%-1,42
23Market MTH Feb-23Abc MTH Feb-23Market PYG MTH %Market PYG MTH absAbc PYG MTH %Abc PYG MTH absAbc MS MTH Feb-23Abc Var MS (p.p.) PY MTH316 Lx - Lisboa (SMMaior)71710188 2684 40510,5%17 847-8,5%-4122,83%2,34%-0,49
24108 780 €3 334 €-2,0%-2 228 €-8,2%-298 €3,06%-0,21320 Lx - Lisboa (SVicente)27301774 8901 2846,7%4 69522,5%2361,49%1,71%0,22
25321 Lx - Lisboa (Campolide)32332758 0155581,5%873123,2%3080,44%0,96%0,52
26331 Lx - Lisboa (SDBenfica - Sul)3113207 0658 093-0,2%-492-7,7%-6724,22%3,91%-0,31
27332 Lx - Lisboa (SDBenfica - Norte)312032133 8227677,7%9 604-13,3%-1180,71%0,57%-0,14
28333 Lx - Lisboa (Carnide)121018240 1643 67810,5%22 813-31,9%-1 7262,49%1,53%-0,95
29349 St - Seixal (Seixal, APPires, FFerro)181222206 3502 4381,9%3 84751,3%8270,80%1,18%0,39
30350 St - Seixal (Arrentela)2152192 31210 011-4,2%-8 451-1,1%-1075,04%5,21%0,17
31351 St - Seixal (Amora)8319304 1784 257-4,5%-14 244-1,6%-701,36%1,40%0,04
32352 St - Seixal (Corroios)468271 3956 534-3,9%-10 96037,6%1 7861,68%2,41%0,73
33353 St - Almada (Laranjeiro)201424197 9472 2791,5%2 90423,6%4350,95%1,15%0,21
34354 St - Almada (CPiedade)131812155 3463 4148,1%11 61235,0%8851,76%2,20%0,44
35356 St - Almada (Feijó)16217120 1393 207-4,6%-5 83225,0%6422,04%2,67%0,63
36357 St - Almada (Caparica, Trafaria)1191138 44211 573-4,1%-5 9812,2%2467,84%8,36%0,52
37358 St - Almada (CCaparica)302328111 7141 072-1,2%-1 309-10,6%-1271,06%0,96%-0,10
38359 St - Almada (ChCaparica, Sobreda)25531280 3911 72811,0%27 737-33,1%-8541,02%0,62%-0,41
39361 St - Setúbal (NSAnunciada, SLourenço, SSimão)17926246 5752 4482,5%6 065-5,5%-1431,08%0,99%-0,08
40362 St - Setúbal (SJulião, SMGraça)24730259 7651 861-4,5%-12 11927,4%4010,54%0,72%0,18
41363 St - Setúbal (SSebastião, GPAGuerra, Sado)11125373 3543 837-4,8%-18 67712,5%4270,87%1,03%0,16
42
43
44hmR Region Values MTH Rank PRDMTH Rank MKTMTH Rank MSMarket MTH Jan-23Abc MTH Jan-23Market PYG MTH %Market PYG MTH absAbc PYG MTH %Abc PYG MTH absAbc MS MTH Jan-22Abc MS MTH Jan-23Abc Var MS (p.p.) PY MTH
45TOTAL5 706 014119 0395,6%300 73312,1%12 8591,96%2,09%0,12
46299 Lx - Amadora (MÁgua - Sul)12245117 3343 672-1,1%-1 2530,8%303,07%3,13%0,06
47300 Lx - Amadora (MÁgua - Norte)15239121 4702 8984,7%5 487-2,9%-872,57%2,39%-0,19
48301 Lx - Amadora (Venteira)11321316 0234 1668,9%25 76927,3%8931,13%1,32%0,19
49302 Lx - Amadora (Alfragide, ÁLivres)4510288 3256 31910,5%27 47015,9%8662,09%2,19%0,10
50303 Lx - Amadora (Falagueira, VNova)202512110 6312 3383,7%3 99136,7%6271,60%2,11%0,51
51304 Lx - Amadora (ESol)141319205 9923 4031,2%2 4287,6%2391,55%1,65%0,10
52308 Lx - Lisboa (Benfica - Sul)7203130 6156 0857,6%9 1750,5%294,99%4,66%-0,33
53309 Lx - Lisboa (Benfica - Norte)5216322 6676 3187,0%21 203-3,9%-2592,18%1,96%-0,22
54310 Lx - Lisboa (Estrela)182113128 6602 60711,7%13 46978,0%1 1421,27%2,03%0,75
55311 Lx - Lisboa (COurique - Oeste)261030222 4111 31514,8%28 642-10,3%-1510,76%0,59%-0,17
56312 Lx - Lisboa (COurique - Este)31302868 65655925,1%13 79789,6%2640,54%0,81%0,28
57313 Lx - Lisboa (Misericórdia)232617109 4631 96329,6%25 02410,2%1812,11%1,79%-0,32
58314 Lx - Lisboa (SAntónio - Oeste)282727106 25993016,5%15 083-19,4%-2241,27%0,88%-0,39
59315 Lx - Lisboa (SAntónio - Este)1728690 1362 66130,2%20 88719,1%4263,23%2,95%-0,28
60316 Lx - Lisboa (SMMaior)8147202 7355 81019,3%32 79722,9%1 0822,78%2,87%0,08
61320 Lx - Lisboa (SVicente)25291489 5141 81413,7%10 820125,1%1 0081,02%2,03%1,00
62321 Lx - Lisboa (Campolide)30312464 19863212,4%7 059110,1%3310,53%0,98%0,46
63331 Lx - Lisboa (SDBenfica - Sul)384241 37910 35712,0%25 94526,1%2 1453,81%4,29%0,48
64332 Lx - Lisboa (SDBenfica - Norte)291731154 01775016,6%21 977-10,5%-880,63%0,49%-0,15
65333 Lx - Lisboa (Carnide)10715254 9075 0379,0%21 02214,1%6241,89%1,98%0,09
66349 St - Seixal (Seixal, APPires, FFerro)21923222 8672 269-1,6%-3 53766,1%9030,60%1,02%0,41
67350 St - Seixal (Arrentela)1122210 94711 037-1,9%-4 03920,5%1 8794,26%5,23%0,97
68351 St - Seixal (Amora)9120338 2185 073-5,6%-20 128-7,8%-4281,53%1,50%-0,04
69352 St - Seixal (Corroios)6611286 4586 127-7,1%-21 73675,9%2 6431,13%2,14%1,01
70353 St - Almada (Laranjeiro)191122220 6092 409-1,7%-3 80815,1%3170,93%1,09%0,16
71354 St - Almada (CPiedade)161618159 2322 8520,2%27824,8%5661,44%1,79%0,35
72355 St - Almada (Almada, Cacilhas, Pragal)241525198 5491 844-0,9%-1 77111,2%1860,83%0,93%0,10
73356 St - Almada (Feijó)13198140 6103 5693,8%5 20930,6%8362,02%2,54%0,52
74357 St - Almada (Caparica, Trafaria)2181153 10011 000-3,3%-5 269-17,2%-2 2808,39%7,18%-1,20
75358 St - Almada (CCaparica)272226121 4801 125-4,1%-5 151-8,6%-1060,97%0,93%-0,05
76359 St - Almada (ChCaparica, Sobreda)22429308 5512 10210,7%29 894-26,0%-7381,02%0,68%-0,34
77362 St - Setúbal (SJulião, SMGraça)27631302 4711 5460,3%7730,4%70,51%0,51%0,00
78363 St - Setúbal (SSebastião, GPAGuerra, Sado)12128449 6744 3083,9%16 84515,7%5840,86%0,96%0,10
79
INDIRECT 2.0
Cells with Data Validation
CellAllowCriteria
C3List=$A$3:$A$4
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Thanks for posting on the forum.

Check this:

varios 17mar2023.xlsm
ABCDEFGHIJ
1
2
3JAN
4
5
6
7299 Lx - Amadora (MÁgua - Sul)
8
9117334.23672.34-0.01056-1252.60.0083230.30.0307120.031298
Hoja6
Cell Formulas
RangeFormula
C9:J9C9=VLOOKUP($D$7,OFFSET($L$1,MATCH("*"&$C$3&"*",$P:$P,0),0,10000,13),COLUMNS($C$8:C8)+4,0)


Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor

----- --
 
Upvote 0
Dear @DanteAmor

Thank you very much for all the help.
Apparently is working fine even if had to change range tables.
Accordingly with sheet examples initially would like also to fill with the above correct text matching.
Can you give a hand? 👍💪
Thanks again.🍺🍺
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,733
Members
448,987
Latest member
marion_davis

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