Ask for Data, Hide non-matches, Report, unhide with Macro
Posted by Marc Hennebery on December 08, 2000 5:06 PM
Dim cell As Range
Is it possible to modify this Macro to ask for the "info" to search for? I would like to have a prompt to the user for a name from Column D, hide all non-matching rows, produce a report, and upon completion run another or just unhide all rows.
Dim aRange As Range
Set aRange = Range(Range("D1"), Range("D65536").End(xlUp))
For Each cell In aRange
If cell.Value <> "info" Then
cell.EntireRow.Hidden = True
End If
Next cell
aRange.SpecialCells(xlCellTypeVisible).EntireRow.Copy