Download PC Drivers - Your Ultimate PC Forums

Full Version: Can I create a macro in Microsoft Excel that will
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hide a row if a particular condition is met? If so, how?
Declare the var, point it at a cell, check to see if the value of the cell is 1, if it is, hide the row, if it isn't unhide it (EntireColumn is another option)Sub hideColumns() Dim Rng As Range Set Rng = Range("B1") If (Rng = 1) Then Rng.EntireRow.Hidden = True Else Rng.EntireRow.Hidden = False End If End Sub
Reference URL's