WPS Spreadsheet: Build an Excel Expense Report with Linked Detail Sheets
Question details
The user needs to create an expense report with a main receipt table and separate detail sheets that populate receipt information automatically.

- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- The report should record receipt data, calculate totals, organize receipt types, and connect each detail sheet to the main receipt entry table.
- Observed behavior
- The user wants formulas to retrieve matching receipt information on detail sheets while grouped rows remain expandable without disrupting calculations.
Decide whether each receipt will be identified by a unique receipt number or by a unique type, and use consistent column names across every sheet. Plan the main table and detail-sheet layouts before adding lookup formulas.
Build a structured receipt table and link each detail sheet with XLOOKUP
Use this recommended method when your WPS Spreadsheet version supports XLOOKUP and each detail row has a receipt number or another reliable lookup key.
A unique receipt number is safer than receipt type alone because multiple receipts can share the same type. Convert the main range to a structured table so formulas and references expand as new receipts are added.
On a sheet named Main Receipt Entry, enter Date, Receipt Number, Supplier, Type, Pretax Amount, Tax, and Total in row 1. Select the range, open the Insert tab, choose Table, and confirm that My table has headers is enabled.
Select the cells in the Type column, open the Data tab, choose Data Validation, select List, and enter the approved receipt types or select a range containing them.
In the first Total cell, enter =[@[Pretax Amount]]+[@Tax]. Press Enter so the table fills the formula down the Total column automatically.
On a detail sheet, place a receipt number in a lookup cell such as B2. To return the supplier from the table named Table1, enter =XLOOKUP(B2,Table1[Receipt Number],Table1[Supplier],"Not found"). Replace the return column with Date, Type, Pretax Amount, Tax, or Total as needed.
Enter the line items below each populated receipt section, select those rows, open the Data tab, choose Group, and select Rows. Use the minus or plus outline buttons beside the row numbers to collapse or expand the details.
Link detail sheets with VLOOKUP or INDEX/MATCH
Use this alternative when XLOOKUP is unavailable or when the workbook must remain compatible with older spreadsheet applications.
Create a linked expense report in WPS Spreadsheet
WPS Spreadsheet provides tables, data validation, formulas, lookup functions, and row grouping to build a receipt entry sheet connected to organized detail sheets. You can calculate totals automatically and keep item-level information expandable.
- 1. Start a spreadsheet: Open WPS Office, select Spreadsheet, and create a blank workbook or open an existing XLSX expense report.
- 2. Create the receipt table: On the first worksheet, enter the receipt headers, select the range, and choose Insert > Table. Add a data-validation list to the Type column from Data > Data Validation.
- 3. Add calculations and lookups: Use =[@[Pretax Amount]]+[@Tax] in the Total column, then use XLOOKUP, VLOOKUP, or INDEX/MATCH on detail sheets to retrieve matching receipt information.
- 4. Organize details: Select item-level rows and choose Data > Group > Rows to create expandable sections beneath each automatically populated receipt.

Frequently Asked Questions
Should I use receipt type or receipt number for the lookup formula?
Use Receipt Number whenever possible because it should uniquely identify one receipt. Use Type only when every type appears once or when the detail sheet is intentionally summarizing one record per type.
How do I create the Total formula in WPS Spreadsheet?
In a structured table, click the first cell in the Total column and enter =[@[Pretax Amount]]+[@Tax]. In a regular range, use a cell formula such as =E2+F2, then fill it down.
Can I populate several fields from the main receipt sheet?
Yes. Create one lookup formula for each field, changing the return range in XLOOKUP or the column index in VLOOKUP. For example, XLOOKUP can return Supplier, Type, Tax, or Total using the same receipt number.
Will grouping rows break the formulas on the detail sheets?
Normally, no. Select the detail rows and use Data > Group > Rows. Grouping only collapses or expands the display; it does not remove formulas or change their references.
What should I do if VLOOKUP returns an error?
Confirm that the lookup value exactly matches the Receipt Number, remove accidental spaces, verify that the lookup key is in the first column of the selected range, and use FALSE for an exact match.




