Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Date filldown

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:D").Filldown
End Sub

Thanks for your help in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Date filldown

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:D").Filldown
End Sub

Thanks for your help in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Date filldown

Try putting somethin into cell D1 before you filldown.

Sub CENSUSFilldown()
With Worksheets("cnsdlywrksht")
.Range("D1") = .Range("H1")
.Range("D1:D10").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:D").Filldown
End Sub

Thanks for your help in advance!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Date filldown

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:D").Filldown
End Sub

Thanks for your help in advance!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Date filldown

On Aug 21, 4:06 pm, Tasha 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:D").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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filldown Todays Date Aaron Excel Programming 2 November 28th 06 08:29 PM
Filldown? & Cmb? Jennifer Excel Programming 1 May 16th 06 04:28 AM
FillDown Macro Nick Junod Excel Worksheet Functions 3 February 6th 06 10:10 PM
filldown macro BorisS Excel Programming 1 September 1st 05 08:47 AM
FillDown Mike Fogleman Excel Programming 2 November 18th 03 10:46 PM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"