hello,
I have a dynamic table and i'm trying to autofill the last row between columns "H" and "P" in a table with the data of the row that is just above the last one. for example: if the table has 10 rows and the last one is empty from "H" to "P" then autofill to the last row from "h" to "p" with the functions/data/whatever that are in row 9 from columns "H" to "P". this is my code:
Sub test()
Dim isheet As Worksheet
Set isheet = ThisWorkbook.Sheets("INVENTARIO")
lrwdh = isheet.Range("h4").End(xlDown).Select
lrwdh = ActiveSheet.Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 17)).Select
Set lrH = Cells(Rows.Count, "H").End(xlUp).EntireRow
lrH.Select
lrH = ActiveSheet.Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 17)).Select
Selection.AutoFill Destination:=Range(lrHwd, lrH) HERE IS MY ERROR.... I THINK...
End Sub
thank you very much.
kevin
I have a dynamic table and i'm trying to autofill the last row between columns "H" and "P" in a table with the data of the row that is just above the last one. for example: if the table has 10 rows and the last one is empty from "H" to "P" then autofill to the last row from "h" to "p" with the functions/data/whatever that are in row 9 from columns "H" to "P". this is my code:
Sub test()
Dim isheet As Worksheet
Set isheet = ThisWorkbook.Sheets("INVENTARIO")
lrwdh = isheet.Range("h4").End(xlDown).Select
lrwdh = ActiveSheet.Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 17)).Select
Set lrH = Cells(Rows.Count, "H").End(xlUp).EntireRow
lrH.Select
lrH = ActiveSheet.Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 17)).Select
Selection.AutoFill Destination:=Range(lrHwd, lrH) HERE IS MY ERROR.... I THINK...
End Sub
thank you very much.
kevin