Hi guys I have a question regarding a macro I have currently running on my data base. Firstly the spread sheet I upload onto my access data base daily does not have the date on it so I manually fill this in on the first column then the macro auto fills it down the sheet to a count that is in the macro. In this macro it also auto fills in any blank boxes in column 2 and replaces the blank with the number from the box above it .
The problem is this is a daily sheet and it never has the same amount of rows so Im always having to add or remove dates. I was wondering how I would go about getting the macro to auto fill column 2 with the number from above and then recognise that the amount of rows to auto fill with the date in column 1 is the last row in column 2?
Also is there a way to auto add date into the macro ? so I only have to click the macro and it auto fills all the above?
Your help is always appreciated
[Sub FillDate()
'
' Macro1date Macro
'Dim WkRg As Range
Dim F As Range
Set WkRg = Range("B2:B" & Range("C" & Rows.Count).End(xlUp).Row)
WkRg.Select
For Each F In WkRg
If F = "" Then F = F.Offset(-1, 0)
Next '
Range("A2").Select
Selection.Copy
Range("A3").Select
ActiveSheet.Paste
Range("A2:A3").Select
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("A2:A45"), Type:=xlFillDefault
Range("A2:A45").Select
End Sub
]