Friday, July 28, 2023

Hide rows in excel based on cell value using VBA

Sub HideRow()
LineStart = 2
LineEnd = 16
ColumnNumber = 2
For i = LineStart To LineEnd
If Cells(i, ColumnNumber).Value <> "YourCellValue" Then
Cells(i, ColumnNumber).EntireRow.Hidden = True
Else
Cells(i, ColumnNumber).EntireRow.Hidden = False
End If
Next i
End Sub

No comments:

Post a Comment

Office 2021 Activation using command

  @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - office.com&cls&echo =====================================...