A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi NZAnn,
Thank you for querying in this forum.
From your description, it seems that you want to hide the related rows it the cells contains Yes.
If my understanding is right, you can use the VBA code below:
Sub HideRows()
Dim cell As Range
For Each cell InActiveWorkbook.ActiveSheet.Columns("A").Cells
If cell.Value ="Yes" Then
cell.EntireRow.Hidden = True
End If
Next cell
End Sub
We have tested it on our side, and we created a new workbook > typed Yes and No in column A, as shown below:
Then clicked Developer > Visual Basic > Inserted Module, run VBA code above, as shown below:
If the scenario above is not consistent with yours, you can also post back and provide more details about your requirement.
Best Regards,
Sukie