Last value in column

Manassasralph

New Member
Joined
Nov 23, 2010
Messages
4
I have a column of values (Buy or Sell). There are blanks between some of the values.

I need to know the last value in the column.

I have Googled it, but I don't understand the explanations.

Any help is appreciated,

Manassasralph
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Welcome to the Board!

If the text values are in column A, this will find the last one:

=LOOKUP(REPT("z",255),A:A)

HTH,

EDIT: **** slow 1xRTT wifi connection ;)
 
Upvote 0
I have a column of values (Buy or Sell). There are blanks between some of the values.

I need to know the last value in the column.

I have Googled it, but I don't understand the explanations.

Any help is appreciated,

Manassasralph
I'm assuming that "blanks" means EMPTY cells.

If the only entries in the range are the text entries BUY or SELL, try this:

=LOOKUP("z",A:A)
 
Upvote 0
Thank you for the replies.

I have tried both solutions, but neither returns the last value in the column.
Let me restate; I have a column of values (which are either Buy or Sell). There maybe empty cells in the column. The length of the column varies (today I may have 2500 values and tomorrow I may have 2600 values). What I am trying to see is last value in the column i.e. Buy, Sell, or Blank/Empty.

I may have misunderstood the solutions given. What is meant by "z"? What is meant by ("z",255)? Am I correct in understanding A:A represents column A? My values start in row 8 of column V, does this change the expression (other than just V:V)?

Again, many thanks for offering a solution,

Manassasralph
 
Upvote 0
OK, so your using column V.
NO it won't matter that your data starts in row 8.

This will return the last TEXT VALUE in column V
=LOOKUP(REPT("z",255),V:V)

A blank (by it's own definition) is NOT a Value, because it's blank/nothing.
Therefore the last value in a column will not be a Blank.


Perhaps you need another way to define the end of your column.

Is there ANOTHER column that has non blanks all the way down to the end of your data?
If so, we can use OFFSET or something to get the value adjescent to the last value in that column.
 
Upvote 0
Actually, wouldn't even need offset..

Say Column V is the column you want to return from, as you've stated before.
Now, say Column W Actually does have NON BLANK values all the way to the end of your data.

This will work

=LOOKUP(REPT("Z",255),W:W,V:V)
 
Upvote 0
If the Values in Colum V are populated via a formula.
And your blanks are actually a result of a formula that returns blank (""), then use

=LOOKUP(2,1/(V1:V5000<>""),V1:V5000)


A formula that returns "" is NOT considered a blank. It is a Null String.

Hope that helps.
 
Upvote 0
I wonder which would operate faster:

=LOOKUP(2,1/(V1:V5000<>""),V1:V5000)

=LOOKUP(9.99999999999999E+307,SEARCH("?",V1:V5000),V1:V5000)
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top