Home » Science & Technology » [Q & A Response ]Excel VBA: How to Blank Out Row if a Cell in the Row is Blank || 3 Techniques

[Q & A Response ]Excel VBA: How to Blank Out Row if a Cell in the Row is Blank || 3 Techniques

Written By Skills and Automation on Friday, Nov 26, 2021 | 05:29 AM

 
Learn how to blank out the contents within a row if any one cell within the row is blank. We will check out 3 ways to do this: SpecialCells, For Each Loop and For Loop. Skill Level: Beginner #vba #learnvba #excelvba #excel #exceltutorial #exceltips This is video response to a question on one of my videos on how to delete blank rows. https://youtu.be/7msN9EYpBbg While we will follow a similar logic, there are a few points to consider. SpecialCells is fast and will work on empty cells, but not on cells that have a blank value due to a formula. For Each loop will work on formulas. But, if there are more than one blank cells within the row, the loop will iterate over each cell. This is redundant. The trusted For loop can handle all these complexities. Full code can be found at: https://skillsandautomation.com/how-to/how-to-blank-out-row-if-cell-is-blank-excel-vba/ 00:00 Introduction 00:50 Using SpecialCells 03:00 Using For Each Loop 04:48 Using For Loop