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 it. Thanks
I'm using this code, but I get an "Application definition or object definition error" error and I can't get over it. Thanks
With Folha21.ListObjects(1).DataBodyRange
.Columns.Range("A:I,M,P,S,V,X:AF,AT,AV,AX,AZ,BA,BD:BE,BH,BL:BP,BS,BV,BY").NumberFormat = "@"
End With​
3 Replies
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 WithAlso, I don't think you need .Columns in there.