1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel 2010 vs 2013 TableStyle naming

Discussion in 'Discuss Data Visualizations and Charting' started by Dr. Demento, May 3, 2018.

  1. Dr. Demento

    Dr. Demento Member

    Has anyone else noticed that the color schemes for Tables created in 2010 are different than those in 2013? From what I can see, the grey and blue (first and second styles) in each color grouping (1-7, 8-14, 15-21, etc) are the same; the remainder are a little off (2010 red vs 2013 orange = Light10) but some are really off (2010 green vs 2013 grey = Light11).

    More importantly, any recommendations on how I can update workbooks created in 2010 to the 2013 color schema so that when I copy a sheet to a new workbook, the desired color is inherited and not based on the color scheme index?

    Thanks y'all. This is a cross-post from Mr. Excel (link)

    Here is some code to create the table color schema; as far as I can tell, the difference is the version the workbook was created under.

    Code (vb):
    Sub styles_listGrid_drD()
    ' ~~ Array of examples of TableStyles
    ' http://www.mrexcel.com/forum/excel-q...estyles.html#3

    Const maxDepth  As Long = 25
    Const strtCell  As String = "B2"
    Dim Down        As Long
    Dim Across      As Long
    Dim tblStyl    As TableStyle
    Dim rng        As Range
    Dim i          As Long

      With ActiveWorkbook.Worksheets.Add

        For i = 0 To 143
          Set tblStyl = ActiveWorkbook.TableStyles(i + 1)
          Down = (i Mod maxDepth)
          Across = Int(i / maxDepth)
          Set rng = .Range(strtCell).OffSet(Down * 4, Across * 2).Resize(3, 1)

          With .ListObjects.Add(xlSrcRange, rng, , xlYes)
            .TableStyle = tblStyl
            .ListRows(1).Range.Cells(1, 1).Value = i + 1
            .HeaderRowRange.Columns(1) = tblStyl.Name
          End With
        Next i

      End With 'ActiveWorkbook
    End Sub

Share This Page