Last value in any column

Merlinwarrior

New Member
Joined
Dec 4, 2018
Messages
3
Good day,
I need either a function or macro that will give me the last numeric value of any column of data. I have read the threads related to "=LOOKUP(2,1/(A:A<>""),A:A)."
However the above limits me to column A and I don't have the skills to change it to give me what I need from other columns.

The purpose of use is for a dashboard. I need to extract totals from many spreadsheets every day, to just one sheet with the = function in cells on that dashboard. The intention is to paste the volumes of data into many tabs and then just pull the totals to the one dashboard sheet.

Apologies for the long explanation of the purpose.

Thank you!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hello,

When you are saying

last numeric value of any column of data

Do you mean last numeric value in ALL your Columns ...?
 
Upvote 0
By naming the range or using table, you can get to the last column.

Else there is a way to use a udf like this one
Code:
Function LastNum()
Dim LastColumn As Long
Dim LastRow As Long
Dim Ctr As Long
    With ActiveSheet
        LastColumn = .UsedRange.Columns.Count
        LastRow = .Cells(.Rows.Count, LastColumn).End(xlUp).Row
    End With
    For Ctr = LastRow To 1 Step -1
        If IsNumeric(Cells(Ctr, LastColumn).Value) = True Then
            LastNum = Cells(Ctr, LastColumn).Value
            Exit Function
        End If
    Next Ctr
End Function

and then typing this is in sheet
Code:
=LastNum()
 
Upvote 0
Row\Col
A​
B​
C​
D​
1​
DataResultFormulaTask
2​
1​
99​
=LOOKUP(9,99999999999999E+307;A2:A14)Get value last number
3​
300​
Peter​
=INDEX(A2:A14;MATCH(REPT("z";255);A2:A14))Get value last tekst
4​
400​
99​
=INDEX(A2:A14;MATCH(9,99999999999999E+307;A2:A14))Get value last number
5​
500​
Peter​
=LOOKUP(2;1/(LEN(A2:A14)>0);A2:A14)Get value last tekst/number
6​
Chantal​
Peter​
=LOOKUP(REPT("z";255);A2:A14)Get value last tekst
7​
1,00E+307​
8​
1​
9​
3​
10​
5​
11​
7​
12​
Mary​
13​
99​
14​
Peter​
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,336
Messages
6,124,334
Members
449,155
Latest member
ravioli44

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