I'm trying to develop a simple code to fill empty cells with the last non empty cell as shown in the image:
Function FILL(x, y)
If Not IsEmpty(y) Then
FILL = y
Else
FILL = ActiveSheet.ActiveCell.Column.End(xlUp).Select.Value
End If
End Function
The code above return #VALUE! on the empty cells instead.