Can anybody please help me write a code to do this in excel macro? I tried recording a macro while I was doing auto filter but that does not work very well for a generic code. I am not copying my code to keep the confusion away.

In each cell of a column copy the formula from previous cell (in the same column) if the adjacent cell on left has a value otherwise stop.
So, for example if I am in cell “I3”. I want to check if “H3” is empty or not, if “H3” has a value (just anything) then copy formula from “I2” into “I3”. and do same for “I4”…which is, check if “H4” is empty or not, if “H4 has a value then copy formula from “I3” into “I4”… and when an empty cell is encountered in column “H” then stop.
Then parse through all the cells in column “I” again and if a cell has “#N/A” value then fill cell with something or if a cell has something else then do nothing and go to next cell or if cell is empty then stop.


Thank you very much.

Jay