Excel XLOOKUP Formula Generator

Advanced lookup function that replaces VLOOKUP, HLOOKUP, and INDEX-MATCH. Searches both vertically and horizontally. Does not require sorting like VLOOKUP.

Required Arguments
Enter the value to search for (e.g., "A2" or specific value)
Enter the range to search within (e.g., "A2:A10")
Enter the range to return values from (e.g., "B2:B10")
Optional Arguments
Value to return if no match is found (leave empty for #N/A)
Generated Formula
Formula will appear here...

XLOOKUP Examples

Scenario Formula Result
Find the name of Employee ID 102 =XLOOKUP(102, A2:A5, B2:B5) Sara
Find the salary of Employee ID 103 =XLOOKUP(103, A2:A5, C2:C5) 55,000
Find the name of an employee using an ID in E1 =XLOOKUP(E1, A2:A5, B2:B5, "Not Found") If E1 = 104, Result: "Zainab"
Find the salary of the closest lower ID (Approximate Match) =XLOOKUP(103.5, A2:A5, C2:C5, "Not Found", -1) 55,000
Find the salary of the closest higher ID =XLOOKUP(103.5, A2:A5, C2:C5, "Not Found", 1) 58,000
Find an employee’s name using a partial match (Wildcard Search) =XLOOKUP("*Ali*", B2:B5, A2:A5, "Not Found", 2) 101
Check if an employee exists in the table =IF(ISNA(XLOOKUP(105, A2:A5, B2:B5, "Not Found")), "Not in List", "In List") If 105 is not in the table, Result: "Not in List"
Dynamic lookup for an employee’s salary based on an ID in E1 =XLOOKUP(E1, A2:A5, C2:C5, "Not Found") If E1 = 102, Result: 60,000
Find the highest salary using MAX with XLOOKUP =MAX(XLOOKUP(A2:A5, A2:A5, C2:C5)) 60,000