Share via

Automatically hiding rows when entering value into cell

Anonymous
2022-09-29T19:14:33+00:00

Hi all,

So so sorry if this question has already been answered, but I cannot find the answer I need anywhere. FYI: I am not looking for a filter or macro solution to my problem.

I am using one of my excel sheets as a to do list. Can anyone instruct me on how to automatically (so not requiring extra steps from my side like clicking on a macro or filtering again) hide a row when I write 'done' in the first column? I keep having to filter out the to do's I have finished, but I was looking for a way to automate that process.

Thanks!

Sophie

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2022-10-03T11:41:25+00:00

    PERFECT! Thank you so so much. I was using the wrong code. You are a master, thank you!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-09-29T21:57:54+00:00

    clicking on a macro or filtering again) hide a row

    how about online sql tool?

    automate filter report generated on web rather than local excel app.

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2022-09-29T20:14:53+00:00

    I don't think that's possible without VBA code. The code could run automatically, though.

    Right-click the sheet tab.

    Select 'View Code' from the context menu.

    Copy the code listed below into the worksheet module.

    Switch back to Excel.

    Save the workbook as a macro-enabled workbook (*.xlsm).

    Make sure that you allow macros when you open it.

    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim rng As Range
        If Not Intersect(Range("A:A"), Target) Is Nothing Then
            Application.ScreenUpdating = False
            Application.EnableEvents = False
            For Each rng In Intersect(Range("A:A"), Target)
                If rng.Value = "Done" Then
                    rng.EntireRow.Hidden = True
                End If
            Next rng
            Application.EnableEvents = True
            Application.ScreenUpdating = True
        End If
    End Sub
    

    Was this answer helpful?

    0 comments No comments