Auto Hide Row when cell contains specific text

MarkRussell

New Member
Joined
Sep 15, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Good evening all.

I have a tasking database in Excel that gathers data from participants via forms. Once this info is assessed, a decision is made whether to take on the work or reject it. Once decided and the task is complete, the employee is required to select "Completed" in the cell.

Once the Cell has "Completed" selected from the drop down in column AA, I would like Excel to automatically hide the completed task from view.

I have tried a number of bits of code from different forums, but I just cannot make it work for my database. Is anyone able to help at all?

I hope this makes sense.

Thanks.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
In the sheet module of the sheet in question:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Target, Columns("AA")) Is Nothing And Target.CountLarge = 1 Then
        Application.ScreenUpdating = False
        Target.Rows.Hidden = Target.Value = "Completed"
        Application.ScreenUpdating = True
    End If
    
End Sub
 
Upvote 0
In the sheet module of the sheet in question:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Target, Columns("AA")) Is Nothing And Target.CountLarge = 1 Then
        Application.ScreenUpdating = False
        Target.Rows.Hidden = Target.Value = "Completed"
        Application.ScreenUpdating = True
    End If
   
End Sub
It doesn't seem to be working. But this could be entirely down to my novice skills. I'll keep trying with it. Thanks for the help.
 
Upvote 0

Forum statistics

Threads
1,221,528
Messages
6,160,346
Members
451,638
Latest member
MyFlower

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top