Calculation Issues

How to Return Previous and Current Month Values in Excel

Huma Ashraf ChHuma Ashraf Ch Nov 11, 2026 868 views

Question details

The user wants to dynamically retrieve monthly project values based on the current date and calculate monthly project progress using elapsed and total workdays.

How to Return Previous and Current Month Values Using Excel Date Lookups
Product
Excel
Device & OS
not provided
Scenario
Tracking project performance dynamically by comparing current month values against previous month values, calculating the delta, and analyzing progress based on workdays.
Observed behavior
The user needs a dynamic set of formulas utilizing INDEX, MATCH, XLOOKUP, and NETWORKDAYS to automatically update tracking metrics based on today's date without manual adjustments.
Before you start

Ensure your project values are organized with continuous monthly dates formatted as actual date values (e.g., the 1st of each month) in a single row to allow INDEX and MATCH formulas to function correctly.

Solution 1Recommended

Use INDEX and MATCH to Retrieve Monthly Values

This method uses the TODAY() function combined with INDEX and MATCH to dynamically look up values for the current and previous months without manual formula updates.

By setting the day value to 1 in the DATE function, we can dynamically match the first day of the current or previous month with the headers in your dataset.

1
Calculate the Previous Month Value

Assuming your monthly dates are in cells L1 to P1 and the values are in L2 to P2, select the cell for the previous month's value and enter: =INDEX($L2:$P2,1,MATCH(DATE(YEAR(TODAY()),MONTH(TODAY())-1,1),$L$1:$P$1,0))

2
Calculate the Current Month Value

In the cell designated for the current month's value, enter the formula: =INDEX($L2:$P2,1,MATCH(DATE(YEAR(TODAY()),MONTH(TODAY()),1),$L$1:$P$1,0))

3
Calculate the Delta (Change)

To find the difference between the two months, subtract the previous month's value from the current month's value. For example: =CurrentMonthPV-PreviousMonthPV

Use INDEX and MATCH to Retrieve Monthly Values
Automatic Updates: Because these formulas rely on the TODAY() function, your spreadsheet will automatically roll over to the new month when the calendar changes.
Efficient Spreadsheet Calculations

Track Monthly Project Values Dynamically in WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas, date lookups, and functions like INDEX, MATCH, XLOOKUP, and NETWORKDAYS to help you track project progress easily and accurately.

  1. 1. Open Your Spreadsheet: Launch WPS Office and open your project tracker spreadsheet.
  2. 2. Enter the Lookup Formula: Select the target cell and enter the INDEX/MATCH formula to fetch your current month's value.
  3. 3. Apply Workday Calculations: Use the =NETWORKDAYS() function in adjacent cells to calculate elapsed workdays against total workdays.
  4. 4. Format and Save: Format your progress cell as a percentage and save the document. Your dashboard will now update automatically.
100% compatibility with Microsoft Excel formulas and file formats (.xlsx).Native support for advanced lookup formulas like INDEX, MATCH, and XLOOKUP.Lightweight software with smooth performance for complex calculations.Free built-in templates for project management and progress tracking.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my MATCH function return an #N/A error with dates?

Dates in spreadsheets are stored as serial numbers. Ensure your lookup array (the header row) contains actual date values formatted as dates (e.g., the 1st of the month) rather than plain text strings.

Can I use XLOOKUP instead of INDEX and MATCH for this task?

Yes, XLOOKUP is a simpler alternative if your software version supports it. For example: =XLOOKUP(DATE(YEAR(TODAY()),MONTH(TODAY()),1),$L$1:$P$1,$L$2:$P$2) accomplishes the same current-month lookup.

How do I handle weekends and holidays in the NETWORKDAYS function?

The NETWORKDAYS function automatically excludes standard weekends (Saturday and Sunday). To exclude specific holidays, supply a range containing holiday dates as the third argument: =NETWORKDAYS(start_date, end_date, [holidays]).