Hide Rows when a cell is populated

user118282

So I have a list of data(tasks) in cells A2 to E2, and in column F is the option for my team to assign their name to it. What I'm trying to make happen, is as a name is inputted in F2, F3, F4.... the respective row disappears.

Example.

F1="Bob" , then row 1 dissapears.

This is what I have so far, but I have a feeling I might be going in the wrong direction with it.

Option Explicit
Private Sub Worksheet_Activate()
    Dim r As Range, c As Range
    Set r = Range("a1:a299")
    Application.ScreenUpdating = False
    For Each c In r
        If Len(c.text) = 0 Then
            c.EntireRow.Hidden = True
        Else
            c.EntireRow.Hidden = False
        End If
    Next c
    Application.ScreenUpdating = True
End Sub

I'm also not sure if this will update it straight away, or I'll have to run the macro everytime. If I've got it right, it should do the first.

Sorceri

as per my comment

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    'check to make sure we only have 1 cell
    If Target.Count = 1 Then
        'check the column
        If Target.Column = 6 Then 'F column
            'check text length and if greater then 0 hide the row
            If Len(Target.Text) > 0 Then
                Target.EntireRow.Hidden = True
            Else
                Target.EntireRow.Hidden = False
            End If
        End If
    End If
End Sub

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Hide Rows when cell is empty excel (faster way)

From Dev

Hide Rows when cell is empty excel (faster way)

From Dev

Hide/unhide rows when clicking on a cell in a given range

From Dev

Hide rows based on cell value

From Dev

Hide Show City and State when zip is populated

From Dev

Hide Rows Based on Content of a Cell - Google Spreadsheet

From Dev

VBA to hide certain rows based on cell value

From Dev

Automatically set value to empty cells in Excel when another cell is populated

From Dev

Hide label when UITableView Cell is tapped

From Dev

Hide table row when cell is empty

From Dev

Hide grey color when cell is touched

From Dev

Excel VBA - Need to delete rows where cell values in column B where reference errors are populated

From Java

Update Outline Header Cell if child rows have 1 or more populated values

From Dev

Populate next empty cell with value above plus 1 until all rows are populated

From Dev

Hide blank rows under last cell in static Table View Controller

From Dev

Vb macro excel 2007 hide rows if cell equal zero

From Dev

VBA code to hide or unhide rows based on a cell value

From Dev

Hide rows in Excel if a cell contains a certain string value

From Dev

Show/hide a certain number of Excel rows based on cell value

From Dev

Vba macro excel: How to hide rows if cell equal FALSE

From Dev

Hide Rows Based on Content of a Cell -issue with onEdit-

From Dev

How to loop through range names and hide rows if cell = 0?

From Dev

Hide blank rows under last cell in static Table View Controller

From Dev

VBA - how to hide rows if cell contains a specified value

From Dev

Filter to show/hide bootstrap table rows with empty column cell value

From Dev

How to automatically hide and unhide rows in excel based on multiple cell value

From Dev

Iterating through populated rows

From Dev

hide/show rows when checkbox is selected

From Dev

Hide rows when column values are duplicate

Related Related

  1. 1

    Hide Rows when cell is empty excel (faster way)

  2. 2

    Hide Rows when cell is empty excel (faster way)

  3. 3

    Hide/unhide rows when clicking on a cell in a given range

  4. 4

    Hide rows based on cell value

  5. 5

    Hide Show City and State when zip is populated

  6. 6

    Hide Rows Based on Content of a Cell - Google Spreadsheet

  7. 7

    VBA to hide certain rows based on cell value

  8. 8

    Automatically set value to empty cells in Excel when another cell is populated

  9. 9

    Hide label when UITableView Cell is tapped

  10. 10

    Hide table row when cell is empty

  11. 11

    Hide grey color when cell is touched

  12. 12

    Excel VBA - Need to delete rows where cell values in column B where reference errors are populated

  13. 13

    Update Outline Header Cell if child rows have 1 or more populated values

  14. 14

    Populate next empty cell with value above plus 1 until all rows are populated

  15. 15

    Hide blank rows under last cell in static Table View Controller

  16. 16

    Vb macro excel 2007 hide rows if cell equal zero

  17. 17

    VBA code to hide or unhide rows based on a cell value

  18. 18

    Hide rows in Excel if a cell contains a certain string value

  19. 19

    Show/hide a certain number of Excel rows based on cell value

  20. 20

    Vba macro excel: How to hide rows if cell equal FALSE

  21. 21

    Hide Rows Based on Content of a Cell -issue with onEdit-

  22. 22

    How to loop through range names and hide rows if cell = 0?

  23. 23

    Hide blank rows under last cell in static Table View Controller

  24. 24

    VBA - how to hide rows if cell contains a specified value

  25. 25

    Filter to show/hide bootstrap table rows with empty column cell value

  26. 26

    How to automatically hide and unhide rows in excel based on multiple cell value

  27. 27

    Iterating through populated rows

  28. 28

    hide/show rows when checkbox is selected

  29. 29

    Hide rows when column values are duplicate

HotTag

Archive