Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default how to find the 2nd last value of a column

I have a column (A:A) and some cells are empty. In B1, I would like to get
the value of the 2nd last value in column A.

e.g. example 1

A1 = 434
A2 = 4343
A3= <empty
A4 = 11
A5 = <empty
A6= <empty
A7 = 343
A8 = 43

In B1, I want it to be 343 (A7)

example 2

A1 = 434
A2 = 4343
A3= <empty
A4 = 11
A5 = <empty
A6= <empty
A7 = <empty
A8 = 43

In B1, I want it to be 11 (A4)


Thanks.

Man

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default how to find the 2nd last value of a column

=INDEX(A:A,LARGE(IF((A1:A100<"")*(A1:A100<""),RO W(A1:A100)),2))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Lamb Chop" wrote in message
...
I have a column (A:A) and some cells are empty. In B1, I would like to get
the value of the 2nd last value in column A.

e.g. example 1

A1 = 434
A2 = 4343
A3= <empty
A4 = 11
A5 = <empty
A6= <empty
A7 = 343
A8 = 43

In B1, I want it to be 343 (A7)

example 2

A1 = 434
A2 = 4343
A3= <empty
A4 = 11
A5 = <empty
A6= <empty
A7 = <empty
A8 = 43

In B1, I want it to be 11 (A4)


Thanks.

Man



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default how to find the 2nd last value of a column

On Thu, 12 Jun 2008 16:48:22 +1000, "Lamb Chop" wrote:

I have a column (A:A) and some cells are empty. In B1, I would like to get
the value of the 2nd last value in column A.

e.g. example 1

A1 = 434
A2 = 4343
A3= <empty
A4 = 11
A5 = <empty
A6= <empty
A7 = 343
A8 = 43

In B1, I want it to be 343 (A7)

example 2

A1 = 434
A2 = 4343
A3= <empty
A4 = 11
A5 = <empty
A6= <empty
A7 = <empty
A8 = 43

In B1, I want it to be 11 (A4)


Thanks.

Man


=INDEX(A1:A65535,LARGE(IF(LEN(A1:A65535)0,ROW(A1: A65535)),N))

entered as an array formula. Hold down <ctrl<shift while hitting <enter.
Excel will place braces {...} around the formula.

For "N", substitute which "from the last" entry you want to return. e.g. in
your question it would be 2:

=INDEX(A1:A65535,LARGE(IF(LEN(A1:A65535)0,ROW(A1: A65535)),2))

If you are using Excel 2007, you may reference the entire column:

=INDEX(A:A,LARGE(IF(LEN(A:A)0,ROW(A:A)),2))
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find last row value in column when using MATCH to find column Bouce Excel Worksheet Functions 6 February 6th 08 10:16 PM
Find something in column a then find if column B matches criteria Darrell_Sarrasin via OfficeKB.com Excel Discussion (Misc queries) 8 November 28th 07 09:40 PM
Find max value in one column and return the value of corrosponding cell in different column [email protected] Excel Worksheet Functions 5 October 16th 07 12:33 PM
Find First Non blank cell than find column header and return that value Silver Rose Excel Worksheet Functions 10 April 30th 07 05:56 PM
To find Multiple values in column B for a unique value in column A kishdaba Excel Worksheet Functions 2 November 14th 06 12:49 PM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"