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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
=LOOKUP(REPT("z",255),A:A)
This works ok for text, it gives last value of text, it does not work for numeric value. what is the formula for numeric values or mix (text & numeric)?
 
Upvote 0
Aladin's solution should work for you:

=LOOKUP(2,1/(V1:V5000<>""),V1:V5000)
 
Upvote 0
=LOOKUP(REPT("z",255),A:A)
This works ok for text, it gives last value of text, it does not work for numeric value. what is the formula for numeric values or mix (text & numeric)?

The following three-cells approach keeps efficiency of:

LOOKUP(REPT("z",255),A:A)
LOOKUP(9.99999999999999E+307,A:A)

and kindred idioms with Match.

Thus...

D2:

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

D3:

=MATCH(9.9999999999999E+307,A:A)

D4, the cell of the final result:

=INDEX(A:A,IF(COUNT(D2:D3)=2,MAX(D2:D3),SUMIF(D2:D3,">0")))
 
Upvote 0
I wonder which would operate faster:

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

=LOOKUP(9.99999999999999E+307,SEARCH("?",V1:V5000),V1:V5000)
In my tests the LOOKUP/SEARCH method is slightly faster.

However, differences are just about negligible and the difference ratio is uniform no matter what the range size. One version is not significantly faster over a larger range.

Tested on 5000 rows of data up to 65,000 rows of data.
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

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