tatendamark
09-20-2017, 03:05 AM
I am running the code below to input info from multiple workbooks to one workbook with multiple worksheets,
but I would like the auto-fill for column C to end in line with where the last data point in column A ends and not at C700.
(Data in Column A varies in length i.e. number of rows with data varies from sheet to sheet).
e.g. if the last data point in Column A is at A33, then Column C's last data point should be at C33.
Your assistance is greatly appreciated.
Parts of Code:
lastRow = wsM.Range("C700").End(xlUp).Row + 2
wsM.Cells(3, 3).Formula = "=A3/B3"
wsM.Cells(3, 3).AutoFill Destination:=wsM.Range("C3:C700")
but I would like the auto-fill for column C to end in line with where the last data point in column A ends and not at C700.
(Data in Column A varies in length i.e. number of rows with data varies from sheet to sheet).
e.g. if the last data point in Column A is at A33, then Column C's last data point should be at C33.
Your assistance is greatly appreciated.
Parts of Code:
lastRow = wsM.Range("C700").End(xlUp).Row + 2
wsM.Cells(3, 3).Formula = "=A3/B3"
wsM.Cells(3, 3).AutoFill Destination:=wsM.Range("C3:C700")