I have the following VBA:
ActiveSheet.ListObjects("Dashboard").Range.AutoFilter Field:=64, Criteria1 _
:="Adams, Lon"
The problem is when I move columns, my VBA quits working. I'd prefer to use a table column name like this instead:
ActiveWorkbook.Worksheets("Dashboard").ListObjects("Dashboard").Sort.SortFields _
.Add Key:=Range("Dashboard[BC Owner]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
Can someone help me rewrite the first line of code above to use the table column name instead of column number?
Thank you!
Lon
ActiveSheet.ListObjects("Dashboard").Range.AutoFilter Field:=64, Criteria1 _
:="Adams, Lon"
The problem is when I move columns, my VBA quits working. I'd prefer to use a table column name like this instead:
ActiveWorkbook.Worksheets("Dashboard").ListObjects("Dashboard").Sort.SortFields _
.Add Key:=Range("Dashboard[BC Owner]"), SortOn:=xlSortOnValues, Order:= _
xlAscending, DataOption:=xlSortNormal
Can someone help me rewrite the first line of code above to use the table column name instead of column number?
Thank you!
Lon