Function Problems

How to Automatically Populate Excel Prices for Repeated Book Titles

Maira MehtabMaira Mehtab Oct 10, 2026 868 views

Question details

The user needs to automatically fill corresponding prices into a spreadsheet whenever a repeated textbook title is entered.

How to Automatically Populate Prices for Repeated Book Titles in Excel
Product
Excel
Device & OS
not provided
Scenario
Performing repetitive data entry where textbook titles are entered multiple times, and the associated prices need to be pulled automatically from a master reference list.
Observed behavior
The user is looking for a formula-based solution to match textbook titles against a lookup list and automatically populate the correct prices, rather than typing them manually.
Before you start

Ensure you have created a separate master reference table containing all unique book titles in one column and their corresponding prices in the adjacent column.

Solution 1Recommended

Use the XLOOKUP Function (Microsoft 365 and Excel 2021)

The modern XLOOKUP function is the most efficient way to fetch matching prices from a lookup list without worrying about column order.

XLOOKUP is available in Microsoft 365 and Office 2021. It replaces older lookup functions by allowing you to easily specify a fallback value (like "Unknown") directly within the formula if a book title isn't found.

1
Identify your lookup and return arrays

Note the range of your book titles (e.g., D2:D50) and your prices (e.g., E2:E50) in your master reference list.

2
Enter the XLOOKUP formula

Select the first empty cell in your target price column. Type the formula: =XLOOKUP(A2, D$2:D$50, E$2:E$50, "Unknown") where A2 is the book title you just entered.

3
Apply the formula to all rows

Press Enter to see the populated price. Click the cell, hover over the bottom-right corner to see the fill handle, and double-click or drag it down to fill the rest of the column.

Use the XLOOKUP Function (Microsoft 365 and Excel 2021)
Handling Missing Titles: Including "Unknown" at the end of your XLOOKUP formula automatically prevents unsightly #N/A errors when a new book title hasn't been added to your master list yet.
Efficient Data Management

Automatically Fill Prices Using WPS Spreadsheet

WPS Office Spreadsheet fully supports advanced data functions, including both XLOOKUP and VLOOKUP. You can easily set up reference tables, manage large datasets, and automate your repetitive data entry for free.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the textbook data.
  2. 2. Prepare the reference table: Ensure you have a dedicated sheet or area with all unique book titles and their respective prices.
  3. 3. Insert the lookup formula: In the target price cell, type your preferred formula, such as =XLOOKUP(A2, title_column, price_column, "Unknown").
  4. 4. Fill the remaining cells: Press Enter to retrieve the price, then click and drag the fill handle down to instantly populate prices for all repeated textbook titles.
Fully compatible with Microsoft Excel formulas and .xlsx files.Natively supports modern functions like XLOOKUP for flexible data matching.Free, lightweight, and features a familiar user interface for a seamless transition.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my VLOOKUP formula returning an #N/A error?

The #N/A error means Excel cannot find an exact match for the book title in your lookup list. Check for accidental trailing spaces, spelling mistakes, or ensure the title actually exists in the master list.

Can I use XLOOKUP if my prices are in a column to the left of my book titles?

Yes. Unlike VLOOKUP, which requires the lookup value to be in the first column, XLOOKUP can search in any direction. You simply highlight the title column as the 'lookup_array' and the left-side price column as the 'return_array'.

How do I prevent my lookup formulas from breaking when I sort my data?

You must use absolute references for your lookup ranges. By adding dollar signs to your range (for example, $D$2:$E$100 instead of D2:E100), you lock the reference table in place so the formula does not shift when sorting or moving cells.