# 4.5 Two-way lookup — City आणि Month वरून value

Source: https://ravindrabagale.com/mr/excel/ch04-lookup-functions/4-5-two-way-lookup-row-and-column.html
Language: mr (Marathi with English technical terms)

Row label आणि column label यांच्या intersection वरची value म्हणजे two-way lookup. उदाहरणार्थ Nashik ची October sales.

CityMonth sheet च्या A1:E5 मध्ये sample sales ठेवा:

 | City
 | Aug
 | Sep
 | Oct
 | Nov

 | Pune
 | ₹4,12,500
 | ₹5,86,200
 | ₹4,95,300
 | ₹6,10,800

 | Nashik
 | ₹1,48,900
 | ₹1,96,400
 | ₹1,62,700
 | ₹2,21,300

 | Nagpur
 | ₹1,71,200
 | ₹2,05,600
 | ₹1,80,900
 | ₹2,48,100

 | Kolhapur
 | ₹1,02,300
 | ₹1,39,800
 | ₹1,11,400
 | ₹1,57,600

H1 = Nashik आणि H2 = Oct.

INDEX + MATCH + MATCH

=INDEX($B$2:$E$5, MATCH(H1,$A$2:$A$5,0), MATCH(H2,$B$1:$E$1,0))    → ₹1,62,700

पहिला MATCH Nashik ची row, दुसरा MATCH Oct चा column शोधतो. Result ₹1,62,700.

Nested XLOOKUP — Microsoft 365 / Excel 2021+

=XLOOKUP(H2, $B$1:$E$1, XLOOKUP(H1, $A$2:$A$5, $B$2:$E$5))

आतला XLOOKUP Nashik ची पूर्ण row देतो. बाहेरचा XLOOKUP त्या row मधून Oct ची value निवडतो.

Practice

H1 आणि H2 मध्ये City व Month चे drop-downs द्या. मग lookup आणि TEXT वापरून Nashik sales in Oct: ₹1,62,700 असा display तयार करा.

रवींद्र बागले यांची tip

INDEX(data, row MATCH, column MATCH) हा क्रम आहे. City column headers मध्ये शोधू नका. Row आधी, column नंतर. Drop-downs जोडले की हे छोटं interactive report बनतं.
