Hi,
Can someone please help...I have a macro where an input box prompts a user to input a single date...it's only a single date that needs to be copied down based on the length of an adjacent column:
myResponse = InputBox("Date EMAIL Recieved in MM-DD-YYYY Format")
Range("F2") = myResponse
Range("F2").Select
'Paste down
Dim lastRowFF As Long
lastRow = Range("G" & Rows.Count).End(xlUp).Row
Range("F2").AutoFill Destination:=Range("F2:F" & lastRow)
This doesn't work because the dates are auto filled so you get:
[TABLE="width: 500"]
<tbody>[TR]
[TD]12-31-2016 (Cell F2)[/TD]
[/TR]
[TR]
[TD]01-01-2017[/TD]
[/TR]
[TR]
[TD]01-02-2017[/TD]
[/TR]
[TR]
[TD]01-03-2017[/TD]
[/TR]
[TR]
[TD]01-04-2017[/TD]
[/TR]
</tbody>[/TABLE]
What I'm looking to do with .filldown is
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]12-31-2016 (F2)[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
</tbody>[/TABLE]
I tried applying this, but it didn't work:
myResponse = InputBox("Date EMAIL Recieved in MM-DD-YYYY Format")
Range("F2") = myResponse
Range("F2").Select
'Paste down
Dim lastRowFF As Long
lastRow = Range("G" & Rows.Count).End(xlUp).Row
Range("F2").FillDown Destination:=Range("F2:F" & lastRow)
Can someone please help...I have a macro where an input box prompts a user to input a single date...it's only a single date that needs to be copied down based on the length of an adjacent column:
myResponse = InputBox("Date EMAIL Recieved in MM-DD-YYYY Format")
Range("F2") = myResponse
Range("F2").Select
'Paste down
Dim lastRowFF As Long
lastRow = Range("G" & Rows.Count).End(xlUp).Row
Range("F2").AutoFill Destination:=Range("F2:F" & lastRow)
This doesn't work because the dates are auto filled so you get:
[TABLE="width: 500"]
<tbody>[TR]
[TD]12-31-2016 (Cell F2)[/TD]
[/TR]
[TR]
[TD]01-01-2017[/TD]
[/TR]
[TR]
[TD]01-02-2017[/TD]
[/TR]
[TR]
[TD]01-03-2017[/TD]
[/TR]
[TR]
[TD]01-04-2017[/TD]
[/TR]
</tbody>[/TABLE]
What I'm looking to do with .filldown is
[TABLE="class: outer_border, width: 500"]
<tbody>[TR]
[TD]12-31-2016 (F2)[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
[TR]
[TD]12-31-2016[/TD]
[/TR]
</tbody>[/TABLE]
I tried applying this, but it didn't work:
myResponse = InputBox("Date EMAIL Recieved in MM-DD-YYYY Format")
Range("F2") = myResponse
Range("F2").Select
'Paste down
Dim lastRowFF As Long
lastRow = Range("G" & Rows.Count).End(xlUp).Row
Range("F2").FillDown Destination:=Range("F2:F" & lastRow)