fill down

P

peter

Hi,
I'm prety sure I saw a way to do this...
c

4 fred
5
6
7 harry
8
9
10 sam
After selecting the whole range, a key stroke that will
fill the open cells with fred(c5 and c6) and harry(c8 and
c9).

peter
 
F

Frank Kabel

Hi
after selecting C4:C10
- hit F5
- click 'Special'
- choose 'Empty cells'
- enter the equation sign '='
- hit the upper arrow key
- hit CTRL+ENTER
 
P

Paul Lautman

I have a few useful macros in my PERSONAL.XLS.

The 3 that are most used are
LastCell
Copy_Down_Block
Propogate_data

It is the latter that you are after. Here they all are:
Sub propogate_data()
With Selection
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
End Sub

Sub LastCell()
'Ctrl-L

On Error GoTo blanksheet

Cells(Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row, _
Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByColumns).Column).Select
Exit Sub
blanksheet:
Range("A1").Select
End Sub

Sub copy_down_block()
'Ctrl-M
Range(Selection.Cells(1, 1), Selection.Cells(Cells.Find(What:="*",
SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row - Selection.Row + 1,
Selection.Columns.Count)).FillDown
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top