How to Display the Last Three Values from a Row in Excel
Question details
The user needs to extract and display the three most recent daily results from an expanding row of data into a separate summary area or a different worksheet.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a dynamic daily results summary where new data is added to the end of a row daily, and a summary section needs to automatically reflect the latest three entries.
- Observed behavior
- The user wants the summary cells to automatically update with the newest populated cells in the row without having to manually rewrite cell references each day.
Ensure that your row of data does not contain empty cells between the daily entries, as dynamic formulas rely on counting the total number of non-blank cells to locate the end of the row accurately.
Use Dynamic Formulas (INDEX and COUNTA)
The most robust method for a growing dataset, automatically updating the summary whenever you add new daily results to the row.
By combining the INDEX and COUNTA functions, you can instruct Excel to dynamically look at the entire row, count how many cells contain data, and return the values situated at the very end. This means you never have to manually adjust the formula.
Click on the cell in your summary area where you want the third-to-last value to appear.
Type =INDEX(3:3, COUNTA(3:3)-2) and press Enter. Replace '3:3' with your actual row number. This counts the non-empty cells and steps back two spaces to find the third-to-last entry.
In the next summary cell, enter =INDEX(3:3, COUNTA(3:3)-1) to pull the second-to-last daily result.
In the final summary cell, enter =INDEX(3:3, COUNTA(3:3)) to display the absolute latest data point entered in the row.

Use Simple Direct Cell References
A quick and straightforward solution if your data range is fixed or if you only need a temporary summary without complex formulas.
Effortlessly Manage Dynamic Data with WPS Spreadsheet
WPS Spreadsheet provides full, built-in support for advanced functions like INDEX, MATCH, and COUNTA, making it incredibly easy to build automated daily summaries and extract the latest row values without hassle.
- 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your daily results.
- 2. Navigate to the summary tab: Switch to the worksheet where you want to display the last three values.
- 3. Apply dynamic functions: Use the =INDEX() and =COUNTA() combination to automatically fetch the end-of-row values without manual updates.
- 4. Save your work: Save your file seamlessly in .xlsx format to retain full formula compatibility with other spreadsheet software.

Frequently Asked Questions
Can I use the OFFSET function instead of INDEX?
Yes, you can use a formula like =OFFSET(A3, 0, COUNTA(3:3)-1) to find the last value. However, OFFSET is a 'volatile' function, meaning it recalculates every time any change is made to the worksheet, which can slow down large files. INDEX is generally preferred for performance.
What if there are blank cells scattered in my daily results row?
If there are blank cells, COUNTA will return an inaccurate count, and INDEX will pull from the wrong column. To find the true last non-blank value in a row with gaps, use the LOOKUP function: =LOOKUP(2,1/(3:3<>""),3:3).
How can I automatically pull the column headers corresponding to the last three values?
You can use the exact same INDEX and COUNTA logic, but change the first argument to point to your header row. For example, =INDEX(1:1, COUNTA(3:3)) will return the header from Row 1 that corresponds to the last data entry in Row 3.




