Home |
Search |
Today's Posts |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Find cell address of last cell in a column with text
Thanks, but not quite what I'm looking for.
I do not know the address of the last cell. I need the spreadsheet to tell my macro the address of the last non empty cell. I have column of numbers that may have some empty cells, I need a way for a macro to determine the last non empty cell in the column. I was hoping to write a formula on the worksheet that the macro could reference so it would know where to copy new information. Or if a function is not possible, a VBA solution would be OK Thanks Mike "Sheeloo" wrote: Since you already have the last cell adapt the following to get what you want - The following example displays four different representations of the same cell address on Sheet1. The comments in the example are the addresses that will be displayed in the message boxes. (Source: http://msdn.microsoft.com/en-us/libr...ffice.11).aspx) Set mc = Worksheets("Sheet1").Cells(1, 1) MsgBox mc.Address() ' $A$1 MsgBox mc.Address(RowAbsolute:=False) ' $A1 MsgBox mc.Address(ReferenceStyle:=xlR1C1) ' R1C1 MsgBox mc.Address(ReferenceStyle:=xlR1C1, _ RowAbsolute:=False, _ ColumnAbsolute:=False, _ RelativeTo:=Worksheets(1).Cells(3, 3)) ' R[-2]C[-2] "mike in texas" wrote: Is it possible to return the address of the last non empty cell in a column. I've found lots of ways to return the value of the last cell, but I need the address e.g. D234. Thanks Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maddening Dilemma - Compare each cell within column a to each cell in column b and find unique matches | Excel Worksheet Functions | |||
find common text in cell in column in sheet then return total amou | Excel Worksheet Functions | |||
find last cell in range with data, display cell address | Excel Worksheet Functions | |||
find email address in a cell | Excel Worksheet Functions | |||
Is there a way to find the address of a cell with a certain value? | Excel Worksheet Functions |