Excel Tips - Autofit Row Height to Cell Contents | Auto Text Wrap | Apply to Specified Range Example
Career Solutions Career Solutions
26.6K subscribers
909 views
0

 Published On May 13, 2024

Hey team,

In this video I show you how to autofit row height and text wrap using basic VBA for both the entire worksheet and only a certain range, if desired.

Chapters:
0:00 Introduction
0:36 Autofit Row Height | Entire Workbook
1:06 Autofit Row Height | Specified Range


VBA Code for applying autofit row height to entire worksheet:
Cells.WrapText = True
Cells.EntireRow.AutoFit

VBA Code example for applying autofit row height to specified range (Remember to adjust first row of code to specify your desired range):
Set Rng = Range("A1:B100")
Rng.Cells.WrapText = True
Rng.EntireRow.AutoFit

show more

Share/Embed