Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding Last value in a column
Currently I am using the following Macro to find the last/bottom value of a
column: Sheets("Daily").Activate n = Cells(Rows.Count, "l").End(xlUp).Row Cells(n, "l").Copy Sheets("Data").Range("D8") I was wondering if it is possibe to use a function instead if a macro to find the last vlaue in a column? Thnaiks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding Last value in a column
Perhaps:
Function lastvalueincolumn(r As Range) As Variant lastvalueincolumn = "" cl = r.Column If IsEmpty(Cells(Rows.Count, cl).Value) Then n = Cells(Rows.Count, cl).End(xlUp).Row lastvalueincolumn = Cells(n, cl).Value Else lastvalueincolumn = Cells(Rows.Count, cl).Value End If End Function used as: =lastvalueincolumn(A:A) -- Gary''s Student - gsnu200776 "chris miller" wrote: Currently I am using the following Macro to find the last/bottom value of a column: Sheets("Daily").Activate n = Cells(Rows.Count, "l").End(xlUp).Row Cells(n, "l").Copy Sheets("Data").Range("D8") I was wondering if it is possibe to use a function instead if a macro to find the last vlaue in a column? Thnaiks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Finding Last value in a column
=LOOKUP(1E+100,A:A)
Gord Dibben MS Excel MVP On Mon, 31 Mar 2008 17:54:25 -0700, chris miller wrote: Currently I am using the following Macro to find the last/bottom value of a column: Sheets("Daily").Activate n = Cells(Rows.Count, "l").End(xlUp).Row Cells(n, "l").Copy Sheets("Data").Range("D8") I was wondering if it is possibe to use a function instead if a macro to find the last vlaue in a column? Thnaiks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding max and min in column | Excel Worksheet Functions | |||
Finding the same value in another column | Excel Worksheet Functions | |||
Finding a number in a column out of an array in another column | Excel Discussion (Misc queries) | |||
Finding Info from Column A and Removing it from Column B | Excel Discussion (Misc queries) | |||
Finding the closest number in column A and take the value in column B | Excel Worksheet Functions |