On Aug 21, 4:06 pm, Tasha <Ta...@discussions.microsoft.com> wrote:
> thanks, that did work, but what if I want to fill down to the bottom of all
> the rows of data? there are spaces in column D in places.
>
>
>
> "Marc W" wrote:
> > If you are wanting to copy the date down into all the cells below D2 that
> > have been populated, I would use this code:
>
> > Range("H1").Select
> > Selection.Copy
> > Range("D2").Select
> > Range(Selection, Selection.End(xlDown)).Select
> > ActiveSheet.Paste
>
> > Hope that helps.
> > -Marc
>
> > "Tasha" wrote:
>
> > > I want to filldown the date shown in cell H1 to column D starting with D2 to
> > > the last row with data in it. I'm not having any luck. Can someone help me
> > > with this? I've looked on previous posts and haven't seen anything that can
> > > help me. Keep getting errors.
>
> > > Sub CENSUSFilldown()
> > > Worksheets("cnsdlywrksht").Range("D2
").Filldown
> > > End Sub
>
> > > Thanks for your help in advance!- Hide quoted text -
>
> - Show quoted text -
This will find the last row of data in column 3 and copy all the data
down from d2 to the same row in column d. You can change the value of
oCol to whatever column you want to find the last row of data in.
Of course you can modify the range settings, just make sure to Column
number in the second argument of the range.
Sub CENSUSFilldown()
Dim oCol As Integer, oRow As Single
oCol = 3 'Column Number
oRow = Cells(ActiveSheet.Rows.Count, oCol).End(xlUp).Row 'Finds Last
Row
Worksheets("cnsdlywrksht").Range(Range("D2"), Cells(oRow, 4)).FillDown
End Sub