butters149
New Member
- Joined
- Mar 21, 2018
- Messages
- 23
Hello,
I am trying to use the insert table function, but problem is the active range changes all the time. Below is my current macro for this. Is there a way to perform the insert table function with changing ranges?
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$AE$229"), , xlYes).Name = _
"Table1"
Range("A1:AE229").Select
I am trying to use the insert table function, but problem is the active range changes all the time. Below is my current macro for this. Is there a way to perform the insert table function with changing ranges?
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$AE$229"), , xlYes).Name = _
"Table1"
Range("A1:AE229").Select