View Single Post
 
Old 03-25-2016, 07:10 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Sure, it's possible, but an ordinary macro accessed via Alt-F8 won't save much time compared to your manual process. All that would be saved is a couple of keystrokes - for which you'll need a different set of keystrokes to run the macro. For the most part, all you'd be doing is trading one set of keystrokes for another. If anything, you'd probably want a Worksheet_SelectionChange macro, perhaps coded along the lines of:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, ActiveSheet.Range("A1")) Is Nothing Then Exit Sub
With ActiveSheet
  .UsedRange
  Application.EnableEvents = False
  If .UsedRange.Rows.Count > 1 Then .Range("A1:A" & .Cells.SpecialCells(xlCellTypeLastCell).Row).FillDown
  Application.EnableEvents = True
End With
End Sub
The alternative would be an ordinary macro assigned to a keyboard shortcut (thus saving a few keystrokes), coded along the lines of:
Code:
Sub DataFillDown()
With ActiveSheet
  .UsedRange
  If .UsedRange.Rows.Count > 1 Then .Range("A1:A" & .Cells.SpecialCells(xlCellTypeLastCell).Row).FillDown
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote