View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
marcus[_3_] marcus[_3_] is offline
external usenet poster
 
Posts: 140
Default Sizing columns and rows in a workbook

Hi Cam

Here is a start you should be able to change to suit your
requirements. It assumes your datas length is determined by coumn As
row length. It assumes your download goes from Columns A to N. It
also assumes you want the columns autofit. Lot of assumptions.

Good luck

Marcus

Sub ChangeHeight()
Dim lw As Integer

lw = Range("A" & Rows.Count).End(xlUp).Row

For i = lw To 2 Step -1
Range("A" & i).EntireRow.AutoFit
Range("A:N").EntireColumn.AutoFit
Next i

End Sub