skyrockettes2
New Member
- Joined
- Jun 29, 2012
- Messages
- 12
Hi there,
I have a data file ranging from B8 until AI77 (headers from B7:AI7), in case each cell in a row is zero or blank (e.g. B8=C8=D8=E8:AI8= 0) the row needs to be hidden. A sum function cannot be used, since I have both positive and negative values in the cells.
Furthermore, columns H, O, V and AC always have blanks. The cells in the other columns are either zero or any possible number (positive or negative). So basically, if in a row there's somewhere a cell that contains a number other than zero, it needs to remain visible. Otherwise, it can be hidden.
<TBODY> </TBODY>
In this case only row 10 should be hidden.
Is there anyone who can help me with a macro? I would really appreciate your time and effort! Many thanks!
FYI, I'm using Excel 2007, I don't know if that matters...
I have a data file ranging from B8 until AI77 (headers from B7:AI7), in case each cell in a row is zero or blank (e.g. B8=C8=D8=E8:AI8= 0) the row needs to be hidden. A sum function cannot be used, since I have both positive and negative values in the cells.
Furthermore, columns H, O, V and AC always have blanks. The cells in the other columns are either zero or any possible number (positive or negative). So basically, if in a row there's somewhere a cell that contains a number other than zero, it needs to remain visible. Otherwise, it can be hidden.
Row/Column | B | C | D | E | F | G | H | I | J |
8 | 0 | 0 | 0 | 0 | -2 | 0 | 0 | 0 | |
9 | 0 | 1 | 0 | 0 | 0 | -1 | 2 | 0 | |
10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
12 | 6 | 0 | 0 | 1 | 0 | 0 | 0 | 3 | |
13 | 2 | 2 | -4 | 0 | 0 | 0 | 0 | 0 |
<TBODY> </TBODY>
In this case only row 10 should be hidden.
Is there anyone who can help me with a macro? I would really appreciate your time and effort! Many thanks!
FYI, I'm using Excel 2007, I don't know if that matters...
Last edited: