Excel: Hide Rows Based on Criteria

Solved
damienbottollier -  
Kayma2t Posted messages 5 Status Membre -
Hello,

I would like to know how to hide an entire row based on a criterion located at the beginning of the row.
Let me explain...
I have an Excel file for production tracking with the first column "status" where I select the status of the file: to do, in production, ..., and delivered.
I would like the row to be hidden automatically when I select the status "delivered" in my first column.
Is anyone able to help me?
Thank you very much in advance for this valuable assistance!

Damien.

Configuration: Mac OS X / Firefox 14.0.1

4 réponses

Morgothal Posted messages 1350 Status Membre 184
 
Hi,
It's possible with this macro:
Sub Hide_rows() Dim row As Integer For row = 1 To 100 If Cells(row, 1) = "Delivered" Then Rows(row & ":" & row).EntireRow.Hidden = True End If Next End Sub 

It needs to be adapted:
*For row = 1 to 100 (first and last row to check and hide if necessary)
*If Cells(row, 1) = "Delivered" Then (the 1 means column 1, so you need to adapt by indicating the number of the column containing "Delivered", and of course the exact spelling of "Delivered" in your column)

And create a button associated with this macro.

Best regards :)
--
-------------------
Sincerely,
Clément
5
Kayma2t Posted messages 5 Status Membre
 
Is it possible to perform this task with a Check Box?
0