If a cell is empty, I want it to look in the cell above. If that one is empty, it will look in the cell above that until it finds a non-empty cell. When it does, it should return it. It’ll be a UDF called loopUp. Then, when I use it in a cell formula like so: =loopUp(D24), and the range D18:D24 is empty, it’ll show what is in D17.
Here’s some Psuedo:
Function loopUp(Cell)
while Cell is empty
Cell becomes cell above
return cell
I am new to VBA. The thing I am stuck on is how to pass in the address of a cell rather than its value.
Following Siddharth’s last suggestion, here is a way to tackle it.
UPDATE
This may be a better, cleaner, easier to understand solution. I tested it a bit, but someone may break it!