← Back to all guides
Technology · 2 min READ

How to Look Up a Price by SKU in Google Sheets With XLOOKUP

How to Look Up a Price by SKU in Google Sheets With XLOOKUP guide illustration

Return the price for an exact SKU, flag missing codes, and catch duplicate or mismatched identifiers before copying the formula down.

Quick note

Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.

Quick answer

Use XLOOKUP with the SKU as the search key, the catalog’s SKU column as the lookup range, and its price column as the result. Exact matching lets you flag an unknown item before it reaches an order.

Connect an order line to its catalog price

  1. Create a tab named Catalog. Put SKU in A1 and Price in B1. Give each variant its own code. Put MUG-BL and 12 in row 2, then MUG-GN and 14 in row 3.
  2. On an Orders tab, enter SKU in A1 and Unit price in B1. Enter MUG-GN in A2. In B2 enter =IF(A2="","",XLOOKUP(A2,Catalog!$A$2:$A,Catalog!$B$2:$B,"Check SKU",0)).
  3. Format the result column as currency and copy the formula down. The test should return 14. A blank input stays blank and an unlisted code displays Check SKU.
  4. Check each catalog code occurs once. Beside a suspect code on the Catalog tab enter =COUNTIF(A$2:A,A2). A result above one means more than one row could supply the price. With the default search order, XLOOKUP returns the first match.

When a familiar SKU fails

Look for invisible spaces before or after the code. Identifiers such as 0042 need a consistent text format in both places. If an import dropped the zeros, compare the value with the original catalog before repairing it. See how to clean extra spaces in imported cells.

A lookup returns the current catalog price. Preserve the price agreed on a completed order in a separate historical field, for example with Paste special → Values only. Otherwise, tomorrow’s price update can change yesterday’s order. For a catalog maintained in another file, connect the source spreadsheet with IMPORTRANGE.

Google Sheets XLOOKUP reference

SHARE THIS GUIDE

Know someone who could use this?

DISCUSSION

Comments

Comments are reviewed before they become public.

No approved comments yet. Be the first to start the discussion.