{
  "id": 14552137,
  "title": "Excel XLOOKUP: Pull Prices From a Lookup Table in One Formula",
  "url": "https://urgent.news/2026/10/14/excel-xlookup-pull-prices-from-a-lookup-table-in-one-formula",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-14T22:40:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hodadak_official/excel-xlookup-pull-prices-from-a-lookup-table-in-one-formula-9il"
  },
  "original_language": "en",
  "account": "Filling in unit prices on an order sheet can be a tedious task, especially when the price list resides in another table. By using the XLOOKUP function, it becomes possible to pull prices from a lookup table in a single formula, streamlining the process and reducing the risk of errors.\n\nTo apply XLOOKUP, start by entering the formula =XLOOKUP(item, lookup column, return column) in the first unit price cell. Assuming items are listed in column A and the price list occupies columns E (item) and F (price), the formula would be =XLOOKUP(A2,E:E,F:F). Once entered, pressing Enter and dragging the fill handle down to the last row will automatically apply the formula to each row, filling in the corresponding unit prices.\n\nXLOOKUP is designed to handle items that may not exist in the price list. If an item is not found, the function returns #N/A by default. However, by adding a fourth argument, you can specify a more useful value, such as \"Not found\", which replaces the error and makes it easier to identify missing items.\n\nThis powerful tool is particularly useful anytime two lists share a key, such as an item name, employee ID, or product code, and you need to retrieve a value from one list based on that key. It can be applied to various scenarios, like linking orders with price lists, associating staff records with department codes, or matching invoice numbers with payment dates.\n\nIt's crucial to remember that the lookup value must match exactly with the corresponding entry in the lookup column. Even a trailing space or a slight difference in spelling will result in a #N/A error. XLOOKUP is available in Microsoft 365, Excel 2021, and later versions, as well as in Excel for the web. However, if the file is opened in Excel 2019 or earlier, the formula will not function.\n\nWhile XLOOKUP can replicate the functionality of VLOOKUP, it offers a more straightforward approach. Unlike VLOOKUP, which requires the lookup column to be the first column in the range and necessitates a column index number, XLOOKUP takes the two columns directly and performs an exact match by default. In Python, a similar task can be accomplished using a left merge, where rows without a match generate a NaN value, akin to the #N/A error in XLOOKUP.\n\nFor a one-time use case, the formula-based approach using XLOOKUP is likely to be quicker. However, for recurring reports built from exported files, merging the data sets using a tool like pandas is more efficient, as it allows for easy updates when new data is incorporated.",
  "summary": "An order sheet lists items in one order and the price list in another. Filling in unit prices means looking up each item in the price list by eye and copying the number across. It's slow, and with a long list it's easy to copy the price from the wrong row. TL;DR: =XLOOKUP(item, column to search, column to return), then drag it down. Steps In the first unit price cell, enter =XLOOKUP(item, lookup…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}