Function Problems

How to Look Up a Payment Date Within a Sales Date Range in WPS Office Spreadsheets

Anum MushtaqAnum Mushtaq Nov 13, 2026 870 views

Question details

The user needs to return the corresponding payment date when a sales date falls between a start date and an end date stored in another Excel table.

How to Look Up a Payment Date Within a Sales Date Range in WPS Office Spreadsheets
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
The user has a sales table and a separate payment schedule table with start dates, end dates, and payment dates, and needs to map each sales date to the correct payment date range.
Observed behavior
The desired result is a payment date returned automatically for each sales date when it falls within the relevant start and end date range.
Before you start

Open the workbook in WPS Office Spreadsheets and confirm the sales data and payment schedule are ready to convert into Excel tables. If you use the LOOKUP method, make sure the payment schedule's start-date column is sorted in ascending order and contains no blank cells.

Solution 1Recommended

Use LOOKUP with Excel Tables and Sorted Start Dates

Best for a simple lookup when the payment schedule start dates are sorted ascending and each row marks the beginning of a payment period.

The vector form of LOOKUP returns the largest start date that is less than or equal to the sales date. When start dates are sorted in ascending order, this matches the current payment period without needing to reference the end date directly.

1
Convert the payment schedule to a table

Select the payment schedule range in WPS Office Spreadsheets, click Insert > Table, and enable the header row.

2
Sort the start-date column

Click any cell in the Start Date column, go to Data > Sort Ascending, and confirm the range expands to include the whole table.

3
Convert the sales data to a table

Select the sales data range, click Insert > Table, and make sure the Sales date column has a clear header.

4
Enter the LOOKUP formula

Click the first payment date result cell in the sales table, type =LOOKUP([@[Sales date]],Table2[Sales date (Start)],Table2[Payment date]), and press Enter.

Structured references fill the column: Because the formula uses table column references, WPS Spreadsheets fills it down automatically. If your table is not named Table2, replace Table2 with the actual table name shown under Table Tools.
WPS Office Spreadsheets formula solution

Return Payment Dates by Sales Date Range in WPS Office Spreadsheets

WPS Office Spreadsheets supports Excel tables, structured references, and lookup formulas, so you can retrieve the correct payment date for each sales date and save the workbook with Microsoft Excel-compatible .xlsx format.

  1. 1. Open the workbook in WPS Office Spreadsheets: Launch WPS Office Spreadsheets and open the workbook that contains the sales and payment schedule data.
  2. 2. Convert the payment schedule to a table: Select the payment schedule range, click Insert > Table, and confirm the header row.
  3. 3. Enter the lookup formula: Click the first payment date result cell in the sales table and enter the LOOKUP formula using your table and column names.
  4. 4. Confirm the results: Press Enter and verify that the table column returns the correct payment date for each sales date.
  5. 5. Save in Excel format: Save the file as .xlsx to preserve compatibility with Microsoft Excel.
Supports LOOKUP, INDEX, and MATCH functions with Excel structured referencesSaves and opens .xlsx files for seamless Microsoft Excel compatibilityFree, lightweight Office suite for everyday spreadsheet tasksStructured table formulas fill down automatically to reduce manual entry
microsoft office alternative - wps office

Frequently Asked Questions

Why does my LOOKUP formula return #N/A for some sales dates?

The most common causes are a sales date earlier than the first start date or a start-date column that is not sorted in ascending order. Click a cell in the Start Date column, go to Data > Sort Ascending, and remove blank start dates.

Do I need to include the end date column in the LOOKUP formula?

Not for the sorted start-date method. LOOKUP matches the largest start date that is less than or equal to the sales date. If you need to explicitly validate the end date or cannot sort the ranges, use the INDEX and MATCH method instead.

Can I use this lookup when the payment schedule is on a different worksheet?

Yes. Create the table on the other worksheet and refer to it by its structured table and column names, such as Table2[Sales date (Start)] and Table2[Payment date].

How do I convert a normal data range into an Excel table in WPS Office?

Select the data range, click Insert > Table, or press Ctrl+T. In the Create Table dialog, confirm the range and enable the header row option, then click OK.