Excel ListObject with Vertical table heading RRS feed

  • Question

  • Hi,

    How do i create ListObject(Table) in Excel with Table Headings vertically?
    Is it possible? or any other work around instead of ListObject?

    Wednesday, August 19, 2009 2:32 PM


  • A ListObject is like a table, table headers and then loads of data under it. So intrinsically it's row based. They then also link into data with databinding, on the row level.

    But you might decide you don't want all that handy functionality and just want to use a square range of data on a sheet. In which case you create a 2 column table, or 3 or more columns, but first try with 2. Then Column 1 is your header, column 2 is your row (now column) of data, and you manually fill your data set from column 1 with your dataset from row 1.

    of course given that you know how many columns are in your original dataset, you will know how many rows are in your final dataset.

    It wouldn't take much searching to find how to convert a row based sql query into data in columns on the internet.

    So what you are left with is a farely useless list object, which doesn't have any databinding, though some clever chap has probably written some code to databind the columns...

    An alternative I can think of is to use the NamedRange object, and excel's native Transpose function to transpose a variant array from row to column placing the transposed data into the range defined for your NamedRange, then writing some code against the Change event on the NamedRange if you want some type of databinding.... Again more code..

    • Marked as answer by Bessie Zhao Thursday, August 27, 2009 1:47 AM
    Thursday, August 20, 2009 11:48 AM