|Kevin.wilhelm: I tried the formula it removed all rows but even if there was a 7 in G8 it removed it|
Of course it did. You asked for, and I quote, "I need to hide a row when a cell in that row is 0 or blank." There are (in Excel 2003) 256 chances per row that a cell will be empty or 0. That's why I called it, "giving you what you asked for."
Kevin.wilhelm: these G cells will change on there [sic] own and the rows need to hide and show whenever a change is made
Without knowing how they change or what changes them (again with the needless vagueness), there really isn't an answer. Maybe you can use Worksheet_Change, maybe you can't.
Kevin.wilhelm: Also is when I lock some cells in these rows it doesnt let me hide is there any fix to get around that?
You must either unlock the sheet, allow row formatting while locked, or lock the sheet with UserInterfaceOnly set to True.
Dim row As Range
For Each row In ActiveSheet.Range("G8:G53,G55:G63").Rows
row.Hidden = WorksheetFunction.CountBlank(row) _
Or WorksheetFunction.CountIf(row, 0)
Private Sub Worksheet_Change(ByVal Target As Range)
How To Ask Questions The Smart Way