Hey Guys,
I have the following simple macro to fill the cells - if blank - with the data from the cell above. That works, however there is a catch.
Code:
---------
Sub FillColBlanks_Offset()
'fill blank cells in column with value above
Dim Area As Range, LastRow As Long
On Error Resume Next
LastRow = Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, _
LookIn:=xlFormulas).Row
For Each Area In ActiveCell.EntireColumn(1).Resize(LastRow). _
SpecialCells(xlCellTypeBlanks).Areas
Area.Value = Area(1).Offset(-1).Value
Next
End Sub
---------
I want to be able to have the data in the cell selectable from a drop down list. If there is no selection made (cell blank), the cell will populate with the data from the last filled cell above, BUT when you go back and select something from the drop down list, it will automatically repopulate all the pre filled cells with updated data.
eg. A1 selected from drop down list "DATA"
all the cells below automatically fill with "DATA".
however when I go to A17 and manually select the drop down list value of "VALUE" I need all the cells below (A18 - A?) to re-populate with "VALUE" whilst leaving the above cells A2 - A16 as "DATA"
I admit I am NOT a VBA genius, so please be gentle with me.
Thanks in advance.
Bookmarks