by TheExcelAddict.com AutoFit Columns Based On Selected Cells OnlyYou may already know how to easily adjust column widths based on the contents of the column. Just double-click on the border between two column headings and the column will automatically adjust its width based on the widest entry in that column. However, often you will find that you also have a report heading occupying a cell in the same column you want to adjust. The problem is, when you double-click, the column adjusts to fit the report heading which is usually much wider than the data in the cells below. Most users will then resort to manually adjusting the column width by dragging the border of the column heading. What most Excel users are not aware of is that there is a way to adjust column widths to fit your data but ignore data in other cells in that same column. It's called AutoFit Selection. 1) Select just the cells you want to base the column width on. 2) From the Format menu select Column, AutoFit Selection The column width will adjust to fit the widest entry in the selected cells only. Note also that this tip applies similarly to row heights.
(Extra Tip) How To Use Named Ranges Another underused feature of Excel is Named Ranges. Named Ranges allow you to assign a meaningful name to a cell or range of cells and then use that name instead of the actual cell reference in your formulas. A name is easier to remember when you are constructing your formulas. For example, assume you have a workbook that contains a lot of formulas that refer to a tax rate. You could simplify things by using one cell to store the tax rate, naming that cell 'TaxRate' and then, instead of using a cell reference in your formulas, you would use the name 'TaxRate'. Try this:
|