Columns("6: lastcol").ColumnWidth = 10
Columns(6).Resize(, lastcol - 5).ColumnWidth = 10
For rows, you have to resize vertically, not horizontally, so remove the comma from the resize parentheses.i tried for row, not working'
Rows(5).Resize(, lastrow - 4).EntireRow.AutoFit
Rows(5).Resize(lastrow - 4).AutoFit