Dear All,
I am trying to find the last non blank cell in a column. I have the following code - but get an application 1004 error on the line in bold.
the msgbox returns a valid address. "graph" is a valid sheet name and price_workbook exists.Any thoughts ? thanks
regards
Kaps
I am trying to find the last non blank cell in a column. I have the following code - but get an application 1004 error on the line in bold.
the msgbox returns a valid address. "graph" is a valid sheet name and price_workbook exists.Any thoughts ? thanks
regards
Kaps
Rich (BB code):
Public Function last_non_blank_cell(cell_address As Range) As Long
MsgBox cell_address.Address
last_non_blank_cell = price_workbook.Sheets("graph").Range(cell_address).End(xlDown).Row
End Function