hi all, with the following snippet, i am attempting to reformat several columns to currency in the table i have created.
it falls over on this line - .Columns("U:Z", "AG", "AN:AU", "AZ:BA").Style = "Currency"-
where i try to change all the currency columns at the one time. Do i need to have a new line for each column band?
Code:
With Sheets("ITR")
.ListObjects.Add(SourceType:=xlSrcRange, Source:=.Cells(1).CurrentRegion, _
XlListObjectHasHeaders:=xlYes, TableStyleName:="TableStyleMedium2").Name = "TblITR"
.Columns("U:Z", "AG", "AN:AU", "AZ:BA").Style = "Currency"
.Columns("U:Z", "AG", "AN:AU", "AZ:BA").NumberFormat = "_-$* #,##0_-;-$* #,##0_-;_-$* ""-""??_-;_-@_-"
.Cells.EntireColumn.AutoFit
End With
it falls over on this line - .Columns("U:Z", "AG", "AN:AU", "AZ:BA").Style = "Currency"-
where i try to change all the currency columns at the one time. Do i need to have a new line for each column band?