Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Field or formula to return last value in a column?

In Excel 2003, I have a list in a column. I'd like a function/formula that
returns the last value in the column.

For example, if the list looks like:
10
20
5
50
22

I'd like it to return 22.

Any suggestions?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Field or formula to return last value in a column?

Eric

Try this and change the column to suit

=LOOKUP(6.022*10^23,A:A)

Mike

"Eric" wrote:

In Excel 2003, I have a list in a column. I'd like a function/formula that
returns the last value in the column.

For example, if the list looks like:
10
20
5
50
22

I'd like it to return 22.

Any suggestions?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Field or formula to return last value in a column?

Actually, I reallize that I didn't correctly describe what I'm looking for.

I need to return the last NON-BLANK value in the target list.

So for example, if a1:7 reads:
5
1
15
22
7
(blank)
(blank)

I'd like the formula to return 7.

Thanks for your help. Sorry for the confusion.
"Mike H" wrote:

Eric

Try this and change the column to suit

=LOOKUP(6.022*10^23,A:A)

Mike

"Eric" wrote:

In Excel 2003, I have a list in a column. I'd like a function/formula that
returns the last value in the column.

For example, if the list looks like:
10
20
5
50
22

I'd like it to return 22.

Any suggestions?

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Field or formula to return last value in a column?

Did you try my formula?

"Eric" wrote:

Actually, I reallize that I didn't correctly describe what I'm looking for.

I need to return the last NON-BLANK value in the target list.

So for example, if a1:7 reads:
5
1
15
22
7
(blank)
(blank)

I'd like the formula to return 7.

Thanks for your help. Sorry for the confusion.
"Mike H" wrote:

Eric

Try this and change the column to suit

=LOOKUP(6.022*10^23,A:A)

Mike

"Eric" wrote:

In Excel 2003, I have a list in a column. I'd like a function/formula that
returns the last value in the column.

For example, if the list looks like:
10
20
5
50
22

I'd like it to return 22.

Any suggestions?

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Field or formula to return last value in a column?

Yes, I did. I discovered that it worked for my need as I described it. Thanks
very much for your help.

A related question is, can you think of any formula that will stop at the
first blank cell? So, for example, if A1:7 is:

5
3
4
(blank)
1
(blank)
7

The formula would return 4.

I hope it doesn't seem that I'm wasting your time with random inquiries.
This is also something that I've actually needed to do.

Thank again.

"Mike H" wrote:

Did you try my formula?

"Eric" wrote:

Actually, I reallize that I didn't correctly describe what I'm looking for.

I need to return the last NON-BLANK value in the target list.

So for example, if a1:7 reads:
5
1
15
22
7
(blank)
(blank)

I'd like the formula to return 7.

Thanks for your help. Sorry for the confusion.
"Mike H" wrote:

Eric

Try this and change the column to suit

=LOOKUP(6.022*10^23,A:A)

Mike

"Eric" wrote:

In Excel 2003, I have a list in a column. I'd like a function/formula that
returns the last value in the column.

For example, if the list looks like:
10
20
5
50
22

I'd like it to return 22.

Any suggestions?

Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Field or formula to return last value in a column?

hi,

Alt+F11 to open Vb editor, right click 'ThisWorkbook' and insert module and
paste the code below in

call with

=Lastval("A1")


Function lastval(rng As String)
lastval = Range(rng).End(xlDown)
End Function


Mike

"Eric" wrote:

Yes, I did. I discovered that it worked for my need as I described it. Thanks
very much for your help.

A related question is, can you think of any formula that will stop at the
first blank cell? So, for example, if A1:7 is:

5
3
4
(blank)
1
(blank)
7

The formula would return 4.

I hope it doesn't seem that I'm wasting your time with random inquiries.
This is also something that I've actually needed to do.

Thank again.

"Mike H" wrote:

Did you try my formula?

"Eric" wrote:

Actually, I reallize that I didn't correctly describe what I'm looking for.

I need to return the last NON-BLANK value in the target list.

So for example, if a1:7 reads:
5
1
15
22
7
(blank)
(blank)

I'd like the formula to return 7.

Thanks for your help. Sorry for the confusion.
"Mike H" wrote:

Eric

Try this and change the column to suit

=LOOKUP(6.022*10^23,A:A)

Mike

"Eric" wrote:

In Excel 2003, I have a list in a column. I'd like a function/formula that
returns the last value in the column.

For example, if the list looks like:
10
20
5
50
22

I'd like it to return 22.

Any suggestions?

Thanks.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 265
Default Field or formula to return last value in a column?

In article ,
Eric wrote:

A related question is, can you think of any formula that will stop at the
first blank cell? So, for example, if A1:7 is:

5
3
4
(blank)
1
(blank)
7

The formula would return 4.


First define the following...

Insert Name Define

Name: BigNum

Refers to:

=9.99999999999999E+307

Click Ok

Then try the following formula, which needs to be confirmed with
CONTROL+SHIFT+ENTER, not just ENTER...

=LOOKUP(BigNum,A1:INDEX(A1:INDEX(A:A,MATCH(BigNum, A:A)),MATCH(TRUE,A1:IND
EX(A:A,MATCH(BigNum,A:A))="",0)))

--
Domenic
http://www.xl-central.com
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
Formula to return column letters DoubleZ Excel Discussion (Misc queries) 4 July 22nd 08 09:23 PM
formula required to return data from one column Rich Hayes Excel Worksheet Functions 7 March 14th 08 09:19 PM
Formula: Return last entry in column Suzanne Excel Discussion (Misc queries) 8 March 6th 07 11:53 PM
I have an IF formula to return column heading for FALSE NN Excel Discussion (Misc queries) 7 October 5th 06 10:45 PM
Formula to Return Column Heading den4673 Excel Discussion (Misc queries) 4 February 13th 06 09:55 PM


All times are GMT +1. The time now is 12:37 PM.

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

About Us

"It's about Microsoft Excel"