Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
AutoFit Selection
I the Format Column drop down is a choice called 'AutoFit Selection'. How
would you call this function from a macro? What I want to do is two fold. 1. Start at a cell such as cell(4,5) and go to the right most cell with an entry and resize each column as you pass over the cell. 2. Start at the same example cell and go down the column find the longest cell and then call the 'AutoFit Selection' to resize the column. Thanks for explaining this feature. Ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
AutoFit Selection
one way:
Range(Cells(4, 5), Cells(4, Columns.Count).End( _ xlToLeft)).EntireColumn.Autofit By finding the first filled cell to the left of cell IV4, we avoid the loop. In article . net, "Ray Batig" wrote: I the Format Column drop down is a choice called 'AutoFit Selection'. How would you call this function from a macro? What I want to do is two fold. 1. Start at a cell such as cell(4,5) and go to the right most cell with an entry and resize each column as you pass over the cell. 2. Start at the same example cell and go down the column find the longest cell and then call the 'AutoFit Selection' to resize the column. Thanks for explaining this feature. Ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limiting selection in a cell AND linking that selection to a list | Excel Discussion (Misc queries) | |||
Autofit (Columns.EntireColumn.AutoFit) does not work | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
format:column width: autofit selection | Setting up and Configuration of Excel | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions |