Excel Formula to Return Rates from Multiple Item Categories
Question details
The user needs a formula to look up and return matching rates for machines, labor, and materials from a multi-column cost table based on validation lists in an invoice.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating an invoice with data validation lists that requires automatically fetching cost rates from a master table for different categories.
- Observed behavior
- The user needs to retrieve corresponding rates from columns 2, 3, and 4 of a lookup table when an item category is selected.
Ensure your lookup table is organized with the item categories in the first column and the corresponding rates for machines, labor, and materials in the adjacent columns.
Use VLOOKUP with an Array Constant
This method is ideal for extracting multiple corresponding rates from different columns simultaneously using a single formula.
By utilizing an array constant (e.g., {2,3,4}) as the column index number in a VLOOKUP formula, you can command the function to return values from multiple columns at once.
Click on the cell in your invoice where you want the first rate to be displayed (e.g., cell G2 next to your item list in F2).
Type =VLOOKUP(F2, $A$1:$D$4, {2,3,4}, FALSE). Replace F2 with the cell containing your selected item, and $A$1:$D$4 with your absolute lookup table range.
Press Enter to execute the formula. The rates for the respective categories will spill across the adjacent columns. Use the fill handle to drag the formula down for other items in your invoice.

Use INDEX and MATCH for Dynamic Layouts
A more robust alternative to VLOOKUP, especially useful if your lookup table's columns might change order or if the lookup value is not in the first column.
Manage Your Invoices and Rates Easily with WPS Spreadsheet
WPS Spreadsheet fully supports advanced lookup formulas like VLOOKUP, XLOOKUP, and INDEX/MATCH, making it simple to automate your invoices and fetch item rates seamlessly.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your invoice workbook.
- 2. Define your ranges: Ensure your master cost table range and your invoice data validation lists are set up properly.
- 3. Insert the lookup formula: Enter =VLOOKUP(...) directly into the cell or use the 'Insert Function' tool under the 'Formula' tab to easily map your arguments.
- 4. Apply across rows: Press Enter and double-click the fill handle in the bottom-right corner of the cell to apply the formula down your invoice rows.

Frequently Asked Questions
Why does my VLOOKUP formula return an #N/A error?
An #N/A error occurs when the formula cannot find the lookup value in the first column of your table array. Ensure the selected item from your validation list exactly matches the text in your cost table, with no extra trailing spaces.
Can I use XLOOKUP instead of VLOOKUP for returning multiple columns?
Yes, XLOOKUP is excellent for this. You can use a formula like =XLOOKUP(F2, $A$1:$A$4, $B$1:$D$4) to instantly return all three rate columns without needing to specify column index numbers.
How do I update the formula if I add more items to my cost table?
To make your formula update automatically when adding new items, convert your lookup table into an official Table (Ctrl+T) and use structured references instead of absolute cell ranges like $A$1:$D$4.




