Hide Cells

L

lightbulb

Is there a macro or formula I can use to hide certain rows if certain cells
say "OK"?

For example, Hide any Rows between 78 and 131 when column T in those rows
equals "OK", all other rows in that range will remain visible.

Thanks!
 
J

Jarek Kujawa

Sub cus()

For i = 78 To 131
If Range("C" & i) = "OK" Then
Range("C" & i).Rows.EntireRow.Hidden = True
End If
Next i

End Sub
 
L

lightbulb

I selected view code by right clicking on the tab name, and pasted in the
code below, but nothing happened...it's been awhile since I've worked with
Macros, is there something else I have to do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top