The following line checks for the last row of data by looking in column "A" only:
lastrow = Range("A" & ActiveSheet.Rows.Count).End(xlUp).Row
My worksheet has 5 columns of data (columns A through E). Not every cell will always contains data. Therefore, on the last row, there could be times where, for instance, column B, C, D and E contain data but A does not. I need to check all columns in the used range, not just column A, to determine the last row. How do I modify the above code to do that?