1. Enter the formula in the first cell and copy cell.
2. Keeping the 'copy' select the range of cell in the column with hidden
cells. Press F5. From Goto Window click 'Special'. Select 'Visible cells
only'. OK. This will select all the visible cells.
3. Right click>Paste Special>Formulas.
Post back in case you need any help with the formula....