Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about the following:
Dim Rng As Range Dim oCell As Range Dim LastCol As Range Set LastCol = Cells(5, Columns.Count).End(xlToLeft) Set Rng = Range(Cells(5, 1), LastCol) For each oCell in Rng If oCell="" then oCell.ColumnWidth=5 Next oCell "Nigel Bennett" wrote: I have a spreadsheet that retrieves data after it has retreived the data I want to use code to look in row 5 and go thru each cell up to the last colum, if there is nothing in the cell I want it to resize it to a smaller size, is there anyway of doing this Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Column Width: cannot adjust | Excel Discussion (Misc queries) | |||
column width will not adjust | Excel Worksheet Functions | |||
Adjust column width | Excel Discussion (Misc queries) | |||
Adjust Column Width? | Excel Discussion (Misc queries) | |||
adjust column width | Excel Discussion (Misc queries) |