Display Dates and Retrieve Matching Values in Excel
Question details
Display a date as a weekday and day number, and retrieve a related value from another worksheet using an exact match.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains dates to display and lookup values that correspond to information on another sheet.
- Observed behavior
- The desired result is a date display such as Wednesday-17 and a matching value returned from the other worksheet.
Confirm that the date cell contains a valid Excel date and identify the lookup and result columns on the other worksheet. The example below uses Sheet2 column A for lookup values and column B for results.
Format the date and use INDEX and MATCH for the lookup
Use a custom date format or TEXT formula for the display, then return an exact-match value from another sheet.
Select the date cell, such as A1, open Format Cells, and choose Custom. Enter dddd-dd as the format to display a date such as Wednesday-17 while retaining the underlying date value.
If you need the formatted result in a separate cell, enter =TEXT(A1,"dddd-dd"). This returns text rather than a date value.
In the cell where you want the related value, enter =INDEX(Sheet2!B:B,MATCH(E2,Sheet2!A:A,0)). Replace Sheet2 and the cell references with the names and ranges in your workbook.
Compare E2 with the values in Sheet2 column A. MATCH uses 0 for an exact match, and INDEX returns the value from the corresponding row in column B.

Format dates and look up values in WPS Spreadsheets
Use WPS Spreadsheets to display dates with a custom format and retrieve corresponding values from another worksheet with INDEX and MATCH.
- 1. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Format the date: Select the date cell, open Format Cells, choose Custom, and enter dddd-dd.
- 3. Add the lookup: In the result cell, enter =INDEX(Sheet2!B:B,MATCH(E2,Sheet2!A:A,0)), adjusting the sheet name and references to match your workbook.
- 4. Save the workbook: Check the displayed date and lookup result, then use File > Save or Save As to save the workbook.

Frequently Asked Questions
How do I display a weekday and day number without changing the date?
Select the date cell, open Format Cells, choose Custom, and enter dddd-dd. The underlying value remains a date.
What is the difference between TEXT and a custom date format?
The formula =TEXT(A1,"dddd-dd") returns text in a separate cell. A custom format changes only how the original date cell is displayed.
Why does my INDEX and MATCH formula return #N/A?
The lookup value may not exist in the lookup column or may differ in type or spacing. Compare E2 with the entries in Sheet2 column A and check that MATCH uses 0 for an exact match.
How do I reference a sheet name that contains spaces?
Enclose the sheet name in single quotes, as in =INDEX('Sales Data'!B:B,MATCH(E2,'Sales Data'!A:A,0)).




