Populate an Excel Form from a Selected Customer and Date
Question details
Automatically populate a printable form with job-sheet data for a selected customer and date.

- Product
- Microsoft Excel and Power Apps
- Device & OS
- not provided
- Scenario
- A Power Apps application writes job-sheet records to an Excel table stored on Google Drive, and a separate form should retrieve the matching record.
- Observed behavior
- The desired form displays fields from the row matching the selected customer and date.
Confirm that the job-sheet data is in an Excel table with consistent customer names and valid Excel dates. Check whether each customer and date identifies one record or whether multiple jobs can share those values.
Use XLOOKUP to Populate Form Fields
Use this method when each customer and date combination identifies one job record.
The example assumes the table is named Jobs, its columns are Name, Date, and JobNumber, and the form uses B2 for the customer and B3 for the date. XLOOKUP returns the first match if duplicates exist.
On the data sheet, select the records and choose Insert > Table. On the Table Design tab, set the table name to Jobs and confirm the column headers match the formulas.
On the printable form sheet, enter a customer name in B2 and an Excel date in B3. You can use Data > Data Validation to create a customer dropdown.
In the form's job-number cell, enter =XLOOKUP(1,(Jobs[Name]=$B$2)*(Jobs[Date]=$B$3),Jobs[JobNumber],"Not found").
Copy the formula into each required form field and replace Jobs[JobNumber] with the appropriate return column, such as Jobs[Description].
Select a customer and date with a known record, verify the returned fields, and use File > Print to preview the completed form.

Use FILTER to Return Multiple Matching Jobs
Use FILTER when a customer can have more than one job on the selected date.
Build a Customer and Date Lookup Form in WPS Spreadsheets
Use a helper key and VLOOKUP in WPS Spreadsheets to retrieve a job number for a selected customer and date. Extend the same approach to the other fields on your printable form.
- 1. Open the workbook: Open WPS Spreadsheets and choose Open to select the XLSX workbook. If it is on Google Drive, download a copy first.
- 2. Create a lookup key: On a sheet named Jobs, arrange the key in column A, customer in B, date in C, and job number in D. In A2, enter =B2&"|"&TEXT(C2,"yyyy-mm-dd") and fill the formula down.
- 3. Enter the selections: On the form sheet, enter a customer in B2 and a date in B3. Ensure customer names match the Jobs sheet and dates are valid spreadsheet dates.
- 4. Retrieve the job number: In the job-number field, enter =IFERROR(VLOOKUP($B$2&"|"&TEXT($B$3,"yyyy-mm-dd"),Jobs!$A$2:$D$1000,4,FALSE),"Not found"). Adjust the range to include your records, and use the relevant column number for each additional field.
- 5. Verify and print: Test a known customer and date, then choose File > Print to preview the form. Save the workbook and upload it back to Google Drive if needed, coordinating changes with the Power Apps workflow.

Frequently Asked Questions
What happens if two jobs have the same customer and date?
XLOOKUP and VLOOKUP return the first match. Use FILTER to list all matches, or add a unique job ID as another selection criterion for the form.
Why does the lookup show Not found when the date looks correct?
Check that both dates are real Excel date values rather than text. A source value may also contain a time; use a date-only column for matching and confirm the customer name is identical.
Can I select the customer from a dropdown?
Yes. Select the form's customer cell, choose Data > Data Validation, and create a list from a range containing the customer names.
What if my Excel version does not have XLOOKUP?
Use a helper column combining customer and date, then use VLOOKUP against that column. Make sure the helper column is the first column in the lookup range.
Will new Power Apps records appear in the form automatically?
They can appear when they are added to the workbook's source table and the workbook is refreshed or reopened as needed. Make sure new rows have valid dates and any required helper-key formulas.




