ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date filldown (https://www.excelbanter.com/excel-programming/395827-date-filldown.html)

Tasha

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!

Marc W

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!


joel

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!


Tasha

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!


Don[_30_]

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



All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com