# 4.6 XLOOKUP आणि if_not_found

Source: https://ravindrabagale.com/mr/excel/ch04-lookup-functions/4-6-xlookup-basics-and-if-not-found.html
Language: mr (Marathi with English technical terms)

Microsoft 365 / Excel 2021+ मध्ये XLOOKUP वापरता येतो.

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

 | Formula
 | Result

 | =XLOOKUP(G2, Stores!$A$2:$A$8, Stores!$C$2:$C$8)
 | त्या store ची City

 | =XLOOKUP("Dharampeth", Stores!$D$2:$D$8, Stores!$A$2:$A$8)
 | AMN-NGP-01 (left lookup, no trick needed)

 | =XLOOKUP("BLK-PUN-09", Stores!$A$2:$A$8, Stores!$C$2:$C$8, "Not in master")
 | Not in master

Store ID वरून City आणताना lookup आणि return columns स्वतंत्र निवडतो. Dharampeth वरून Store ID डावीकडूनही आणता येतो. Unknown BLK-PUN-09 साठी "Not in master" असा message देता येतो.

काय सोपं होतं?

Default exact match.

Column number मोजावा लागत नाही.

Left lookup आणि horizontal lookup चालतात.

if_not_found हा built-in पर्याय.

शेवटाकडून शोधता येतं.

एकाच वेळी अनेक columns return करता येतात.

Practice

Lesson 4.1 मधले VLOOKUPs XLOOKUP ने बदला. Unknown stores साठी "Add to master" दाखवा.

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

Lookup आणि return arrays ची length सारखी ठेवा. A2:A8 आणि C2:C9 दिले तर #VALUE! येऊ शकतो. दुसऱ्याला file पाठवताना त्याच्या Excel मध्ये XLOOKUP चालतं का हेही पाहा.
