Option Explicit
'used to get last row of a column Function last_row_in_column(column_letter As String) As String Dim data_in_column As Range, result As Long Set data_in_column = Range(column_letter & "1:" & _ column_letter & _ Cells(Rows.Count, column_letter).End(xlUp).Row) Let result = data_in_column.Find("*", , xlValues, , xlByRows, xlPrevious).Row Let last_row_in_column = result