Hi all,
I've done some searching on different forums and can't seem to achieve my objective, I'm also totally new to VBA.
I would like certain rows in a column that are "0" to auto hide, but when the cells receive new data and become a value I want the row to auto unhide. The cells in the column in question have a function that receive data from another sheet in the workbook. So when the user inputs data in the other sheet it will cause a value to appear where the "0" was.
I have used a small code that I got from a MrExcel post in 2011 but I don't have enough knowledge to edit the code.
So the code does auto hide the "0" but it requires extra code to auto unhide when the cell obtains a value from user input from the other sheet and maybe a trigger to rerun the code automatically, not sure if this is possible.
I've done some searching on different forums and can't seem to achieve my objective, I'm also totally new to VBA.
I would like certain rows in a column that are "0" to auto hide, but when the cells receive new data and become a value I want the row to auto unhide. The cells in the column in question have a function that receive data from another sheet in the workbook. So when the user inputs data in the other sheet it will cause a value to appear where the "0" was.
I have used a small code that I got from a MrExcel post in 2011 but I don't have enough knowledge to edit the code.
So the code does auto hide the "0" but it requires extra code to auto unhide when the cell obtains a value from user input from the other sheet and maybe a trigger to rerun the code automatically, not sure if this is possible.
Code:
Sub HideRows()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each c In Range("G7:G200")
If c.Value = 0 Then Rows(c.Row).Hidden = True
Next
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub
[code]
Thanks a lot in advance