PC Review


Reply
Thread Tools Rate Thread

Date filldown

 
 
=?Utf-8?B?VGFzaGE=?=
Guest
Posts: n/a
 
      17th Aug 2007
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!
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFyYyBX?=
Guest
Posts: n/a
 
      17th Aug 2007
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!

 
Reply With Quote
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      17th Aug 2007
Try putting somethin into cell D1 before you filldown.

Sub CENSUSFilldown()
With Worksheets("cnsdlywrksht")
.Range("D1") = .Range("H1")
.Range("D110").FillDown
End With
End Sub

"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!

 
Reply With Quote
 
=?Utf-8?B?VGFzaGE=?=
Guest
Posts: n/a
 
      21st Aug 2007
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!

 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      21st Aug 2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filldown starting from F2 instead of F1 Ephraim Microsoft Excel Worksheet Functions 5 15th Apr 2010 01:05 PM
Filldown code aileen Microsoft Excel Programming 2 3rd Nov 2008 04:29 PM
Filldown Todays Date =?Utf-8?B?QWFyb24=?= Microsoft Excel Programming 2 28th Nov 2006 08:29 PM
Filldown? & Cmb? =?Utf-8?B?SmVubmlmZXI=?= Microsoft Excel Programming 1 16th May 2006 04:28 AM
FillDown Mike Fogleman Microsoft Excel Programming 2 18th Nov 2003 10:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:19 AM.