I have been trying to find a formula to help to loop through selected worksheets in order to trigger grouping and or hiding rows where the selected row meets the criteria. I am in need of some assistance to identify which method is the best way. ideally, I am looking for a macro that looks up cell-E and performs and if function to hide or group the entire row if it returns the value hide.
I am currently running the formula below, however, it only works on one sheet and does not cycle through sheets. Plus I do not have the formula to group rows. I have only managed to find out how to hide rows.
Sub testnet() Dim ws As Worksheet For Each ws In Sheets For Each cell In Range("e14:e150") If cell.Value = "Hide" Then cell.EntireRow.Hidden = True Next cell Next ws End Sub