I am using Excel 2007 and I am looking for a code to automatically hide rows in one sheet based on whether cells in another sheet have a value or are blank.

Essentially, we have Sheet1 and Sheet2. If G5 in Sheet 1 has a value, then Row 6 in Sheet2 should remain displayed. However, if G5 in Sheet1 has no value, then Row 6 in Sheet2 should hide. If G6 in Sheet1 has a value, then Row 7 in Sheet2 should remain displayed. However, if G6in Sheet1 has no value, then Row 7 in Sheet2 should hide. I need this sequence to continue till G95 in Sheet1 and Row 96 in Sheet2.

Also, is this possible to add as well: if G5:G95 in Sheet1 all have no value entered in them, then no rows hide in Sheet2. Otherwise, if one cell has value, then it defers to the above code.
Many thanks for the assistance!!!