Hi, I'm hoping you can help.
I have a long list of cells that I need to fill in the blanks between entries with the contents of the last cell...so if the data looked like this...
Apple
Pear
Orange
I want it to look like this...
Apple
Apple
Apple
Pear
Pear
Orange
I thought the best way to do it was to use a macro with relative references and just repeatedly call the macro...here is what I've created
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/22/2007 by Danette Nguyen
'
' Keyboard Shortcut: Ctrl+q
'
Range(Selection, Selection.End(xlDown)).Select
ActiveCell.Range("A1:A9").Select
Selection.FillDown
Selection.End(xlDown).Select
End Sub
...but the cell range A1:A9 is of defined length and my length between each entry is variable. How can I modify this macro to achieve what I want. Optimally, the macro replaces me from the following keystrokes...
starting at the first entry
ctrl-shift-down arrow
shift-up arrow
ctrl-d
ctrl-shift-down arrow
end
Thanks for your help
I have a long list of cells that I need to fill in the blanks between entries with the contents of the last cell...so if the data looked like this...
Apple
Pear
Orange
I want it to look like this...
Apple
Apple
Apple
Pear
Pear
Orange
I thought the best way to do it was to use a macro with relative references and just repeatedly call the macro...here is what I've created
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/22/2007 by Danette Nguyen
'
' Keyboard Shortcut: Ctrl+q
'
Range(Selection, Selection.End(xlDown)).Select
ActiveCell.Range("A1:A9").Select
Selection.FillDown
Selection.End(xlDown).Select
End Sub
...but the cell range A1:A9 is of defined length and my length between each entry is variable. How can I modify this macro to achieve what I want. Optimally, the macro replaces me from the following keystrokes...
starting at the first entry
ctrl-shift-down arrow
shift-up arrow
ctrl-d
ctrl-shift-down arrow
end
Thanks for your help