Excel 2010 Format As Table

Terry
2011-09-07
2013-01-13
  • Terry
    Terry
    2011-09-07

    How can a take a range of selected cells and then Format As Table using TableStyleMedium9.  I've recorded a macro of my doing this manually and I get

        ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$M$59"), , xlYes).Name = "Table1"
        Range("Table1[#All]").Select
        ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleMedium9"
    

    Is there a way I can do this through OfficePartners?