Thread: FillDown Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Junod
 
Posts: n/a
Default FillDown Macro

Hi,

I am trying to do something that is probably simple. I have data in column
A of my spreadsheet. It is parsed out randomly, meaning that there might be
data in cell A1, A23, A54, A109 so on and so forth.

What I want to do is copy these entries down until they hit the next entry
and then grab that one and copy it down until it hits the next one...

So that A1 will be copied/filled down to A22. A23 will be copied/filled
down to A53...and so on...

I guess it needs to loop?

This is what I have so far and it is not working at all:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/2/2006 by
'

'
Selection.Copy
Range(Selection, Selection.End.(xlDown).offset(-1)).Select
Selection.FillDown
Selection.End(xlDown).Select
End Sub

--
Thanks a million,

Nick Junod