Forum Discussion
csoares
Sep 13, 2021Brass Contributor
How to join columns of a table without continuity
Good afternoon. I want to format a set of columns in a table, which are not together. I'm using this code, but I get an "Application definition or object definition error" error and I can't get over...
HansVogelaar
Sep 13, 2021MVP
You have to write the single-column ranges in C:C format:
With Folha21.ListObjects(1).DataBodyRange
.Columns.Range("A:I,M:M,P:P,S:S,V:V,X:AF,AT:AT,AV:AV,AX:AX,AZ:AZ,BA:BA,BD:BE,BH:BH,BL:BP,BS:BS,BV:BV,BY:BY").NumberFormat = "@"
End With
Also, I don't think you need .Columns in there.
csoares
Sep 13, 2021Brass Contributor
I still receive the same error
- HansVogelaarSep 13, 2021MVP
Could you attach a sample workbook without sensitive information?