Finding the Last value (text or number) in a column

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
In website, he used this vlookup functions to find the last number value and the last text value

=VLOOKUP(9.99999999999999E+307,$A$1:$A$14,TRUE) to get last number

=VLOOKUP("zzz",$A$1:$A$8,1,TRUE) to get the last text


How this works? Why in the first formula he ignored the 3rd argument while in the second one he put the 3rd argument.

Thank you very much.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Give this formula a try...

=LOOKUP(2,1/(A1:A99<>""),A1:A99)

Adjust the range as needed.
 
Upvote 0
Solution
Coz for the numbers 9.99e+307 this is a maximum value excel can understand instead you can take any larger value which is greater than your data set...for example if you have a data set of 20,25,5000 then you can lookup with 1000 and you will get a outcome

For the text Z is a last alphabet and hence rept("z" , 255) - For "Approximate Match",if the lookup_value is bigger than anything in list, it returns that last position - Big Value

Hope this helps you..sorry for the late reply

Hi
In website, he used this vlookup functions to find the last number value and the last text value

=VLOOKUP(9.99999999999999E+307,$A$1:$A$14,TRUE) to get last number

=VLOOKUP("zzz",$A$1:$A$8,1,TRUE) to get the last text


How this works? Why in the first formula he ignored the 3rd argument while in the second one he put the 3rd argument.

Thank you very much.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,425
Members
448,961
Latest member
nzskater

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