I wanted to Apply a TableStyle to an imported Table, but apparently a TableStyle can't overwrite currently existing Formats. But when I use .ClearFormats, it will also Clear the NumberFormat for the "Date" column.
So I decided to do a workaround and use .ClearFormats, but re-apply the Date NumberFormat afterwards. The only problem I am facing is the fact that there are rows with an empty cell in the "Date" column, which makes me unable to use .End(xlDown).
So over to the question: How can I select a Range/Selection where the header name equals "Date" and apply the NumberFormat "dd-mm-yyyy" to the entire column. (PS. I can't hardcode the column number, because the Date might be in a different column for the next imported sheet.)
ListObject(index).ListColumns(index)
to refer to the column. Or you can use.End(xlUp)
from the bottom of the sheet. – kolcinx