Excel Tips - Autofit Column Width | Apply to Specified Range Example

Опубликовано: 01 Июль 2024
на канале: Career Solutions
1,217
52

Hey team,

In this video we cover how to set up your Excel files to autofit the column width to fit cell contents for both the whole spreadsheet and just a certain range.

Chapters:
0:00 Introduction
0:17 Apply Autofit to Full Spreadsheet
0:43 Apply Autofit to Certain Range

VBA Code examples

Full spreadsheet:
Cells.EntireColumn.AutoFit

Selected Range:
Set Rng = Range("A2:A10")
Rng.EntireColumn.AutoFit