Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How to unhide a hiden row automatically whenever it gets a value Hi, I wanna kno

ID: 3560727 • Letter: H

Question

How to unhide a hiden row automatically whenever it gets a value

Hi,

I wanna know how I can unhide automatically a previously hiden row when that row gets a value. For example, I hid 20 rows which cells are reading other sheet, so when I change something at the read sheet that changes the values of the raw, how it will unhide automatically the row?

The values of the cells of the row are zero, but when I change something on the sheet which is being read and that provokes the changing of the values I wanna the enterely cell automatically appears.

Someone can help me, please?

Explanation / Answer

.%Right-click the tab of the sheet whose rows are to be hidden / unhidden | select the View Code option and paste the following code:;'|

'==========>>
Option Explicit

'---------->>
Private Sub Worksheet_Calculate()
    Dim Rng As Range, rCell As Range
    Const zeroCol As String = "A"                                          '<<==== Change

    With Me
        Set Rng = Intersect(.Columns(zeroCol), .UsedRange)
    End With

    For Each rCell In Rng.Cells
        With rCell
            If .HasFormula Then
                .EntireRow.Hidden = .Value = 0
            End If
        End With
    Next rCell
End Sub
'<<==========

Change A to reflect the column which contains the formula of interest.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote