HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Excel Tutorial: Use VBA to instantly change row height based on value entered in worksheet cell

14,502 views November 15, 2018 15:53

Watch on YouTube
ChannelLaunch Excel

Chapters

Description from the creator

// DOWNLOAD Excel workbook + VBA →d1yei2z3i6k35z.cloudfront.net/2762499/66d5ab8b7…

// FREE Excel E-book "Record Your First Macro"
→ launchexcel.com/record-your-first-macro-ebook

// Recommended Excel Courses //

1. Launch Excel Macros & VBA School: go.launchexcel.com/macros-vba-school-youtube
2. Excel Campus Elevate Program: go.launchexcel.com/excel-campus-elevate-youtube
3. My Online Training Hub Dashboards: go.launchexcel.com/moth-dashboard-course-youtube
4. Coursera Excel Specialisation: go.launchexcel.com/coursera-excel-specializatio…
5. Coursera Everyday Excel: go.launchexcel.com/coursera-everyday-excel-yout…
6. Coursera Excel Data Visualisation: go.launchexcel.com/coursera-data-vizualization-…

// Recommended Excel Templates //

If you are looking for pre-built, easy to use spreadsheets, check out Simple Sheets.
go.launchexcel.com/simple-sheets-templates-yout…

They have Excel templates covering cash flow planning, invoices, expense reports, personal budgets, and more!

——
// EPISODE NOTES

In this tutorial video we look at how to automatically change row height by changing the value of a cell on your Excel worksheet using the built-in programming language VBA (Visual Basic for Applications).

We use a Worksheet_Change event to drive the automatic update.

I walk through two sample VBA Subroutines.

VBA Sub 1 - Automatically changes row height for ONE row.

VBA Sub 2 - Automatically changes row height for MANY rows.


——
// VIDEO TIMINGS

0:00 - Introduction
0:41 - Viewer Request Explained
2:00 - Worksheet Change Macro
4:15 - VBA Sub 1 Update_Row_Height
7:03 - How to Enter Worksheet Change Events (VBA Editor)
9:59 - Demo: Multiple Rows
10:51 - VBA Sub 2 Update_Row_Height_Range1
14:01 - Test Subroutines
15:40 - Outro


——
// DOWNLOAD WORKBOOK FOR THIS TUTORIAL

Please follow these instructions to learn from the workbook download:

▸ Download the sample Excel workbook: launchexcel.com/media/samples/VBA/20180315-Chan…

▸ Open the workbook and make sure to enable macros

▸ Press ALT + F11 to open the VBA Editor

▸ Use F8 to step through the code one line at a time

▸ I suggest you adapt this to your own needs... just copy and paste the code, then change the code to work for you

▸ If you have a viewer request, leave me a comment below and I'll try to solve your problem in a new video

——
// REFERENCES

Excel Version: 2016 (used in video)

——
// VISIT MY WEBSITE

For more tutorials on Microsoft Excel and VBA visit the website
→ www.launchexcel.com

About this tutorial

Launch Excel published this 15:53 video tutorial on November 15, 2018. It has been watched 14,502 times on YouTube.

Category
Education
Duration
15:53
Published
November 15, 2018
Views
14,502
Likes
206

Tags

Share

This tutorial in other languages