Vishalunleashed
New Member
Hi Team,
I am looking for a code that adds the table based on the cell value. Let's say in column f2 I have added 10 and then if I run the macro it should insert a table of 10 rows. I have come up with below code but I am not able to add user defined value:
I am looking for a code that adds the table based on the cell value. Let's say in column f2 I have added 10 and then if I run the macro it should insert a table of 10 rows. I have come up with below code but I am not able to add user defined value:
Code:
Sub Macro1()
Application.CutCopyMode = False
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$L$4"), , xlYes).Name = "Table1"
Range("Table1[[#All],[Column1]]").Select
ActiveSheet.ListObjects("Table1").Resize Range("$L$4:$L$14")
Range("F2").Select
End Sub
Last edited by a moderator: