Skip to main content

How to find and return the second to last value in a certain row or column in Excel?

As shown in the screenshot below, how to find and return the second to last value in row 6 or column B of the table range A1:E16? This article will show you a method to achieve it.

Find and return the second to last value in a certain row or column with formulas


Find and return the second to last value in a certain row or column with formulas

As the above screenshot shown, to find and return the second to last value in row 6 or column B of the table range A1:E16, the formulas we provided in this article can help you. Please do as follows.

Find and return the second to last value in column B

1. Select a blank cell for placing the second to last value, enter formula =INDEX(B:B,LARGE(IF(B:B<>"",ROW(B:B)),2)) into the Formula Bar, and then press Ctrl + Shift + Enter keys simultaneously to get the result.

Note: in the formula, B:B is the column where you will find the second to last value. You can change it to any column as you need.

Find and return the second to last value in row 6

Select a blank cell to populate the second to last value in a row, then enter formula =OFFSET($A$6,0,COUNTA(6:6)-2,1,1) into the Formula Bar, and then press the Enter key to get the result. See screenshot:

Note: In this formula, $A$6 is the first cell of the specified row, 6:6 is the row number where you need to find the second to last value,


Related articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
#NOME? - aparece esse erro
This comment was minimized by the moderator on the site
Hi não funciona,

It seems that you are using the Excel in Portuguese language system. Try to translate the formula as follows to see if it works.
=ÍNDICE(B:B;MAIOR(SE(B:B<>"";LIN(B:B));2))
This comment was minimized by the moderator on the site
TENHO UMA COLUNA DE A1 A A221 (VALOR VAI AVANÇANDO), EM OUTRA COLUNA O FATURAMENTO, COMO EU MOSTRO EM OUTRA CELULA O VALOR DO ANTEPENULTIMO VALOR, NO CASO QUERIA MOSTRAR O VALOR NA CELULA A220..
This comment was minimized by the moderator on the site
Hi Nilson,

Sorry I don't quite understand your question. So you mean you have a list of values in A1:A221, and want to display the seond to last value (cell A220) in another cell?
If so, try this formula:
=INDEX(A1:A221,LARGE(IF(A1:A221<>"",ROW(A1:A221)),2))
As this is an array formula, don't forget to press the Ctrl + Shift + Enter keys to get the result.
This comment was minimized by the moderator on the site
Hello, this works great if it is not in the same row. How would I use it in the same row? Example, I have two columns that are entered for empty and full containers for a weekly inventory. I can pull the last data entry in full column by using the formula =LOOKUP(2,1/(I7:GO7<>""),I7:GO7). This represent the last numerical entry on row 7. How would I represent the 2nd to last value in that row?
This comment was minimized by the moderator on the site
Hi Robert,
As you mentioned, the second formula provided in the post can do you a favor. Please apply the following formula.
=OFFSET($I$7,0,COUNTA(I7:GO7)-2,1,1)
This comment was minimized by the moderator on the site
Hi,

This is really helpful thank you - how would I adapt this formulae to only pickup non-zero values?
This comment was minimized by the moderator on the site
Hi Andy,
Do you want to achieve this result? When the second to last value in row 6 is zero, it returns a null value. If so, apply the formula below.
=IF(OFFSET($A$6,0,COUNTA(6:6)-2,1,1)=0,"",OFFSET($A$6,0,COUNTA(6:6)-2,1,1))
This comment was minimized by the moderator on the site
Thanks Gentleman good job
This comment was minimized by the moderator on the site
what does the row do?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations