I have a spreadsheet which hides a particular row based on the value in another cell. The VBA I am using to do this is
The problem is that the value in the target cell changes based on the data in another sheet. When the target cell updates from opening the sheet the data comes from, it does not hide the rows. IT only seems to do that hiding of rows when I specifically go to the cell and either, reenter the code which links to the other sheet, or manually enter the number.
The row hiding is not updating when the target cell value changes when it comes from the other sheet.
Does anyone know how I would go about rectifying this?
PHP:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("J8").Value > 0.8 Then
Rows("29:30").EntireRow.Hidden = True
Else
Rows("29:30").EntireRow.Hidden = False
End If
End Sub
The row hiding is not updating when the target cell value changes when it comes from the other sheet.
Does anyone know how I would go about rectifying this?