cannot autofill 2 cells info at the same time

J

Junior728

Hi,
i try to autofill 2 cells(Rw 3 & 4 info at the same time,and wish to
auotfill rw 5 till lastrow of used rows. i try to do manual , it can be
autofill, but when macro, it can't. The target is to get the final result
like that:

Column C * Autofill Col C only
H 'Row 3
D "Row 4
H ' And so on...
D
H
D
H
D
H
D
H
D
H
D
H
D
H 'Last Used Row

this is my script:

Sheets("New Forecast").Select
Range("C3").Select
ActiveCell.FormulaR1C1 = "H"
Range("C4").Select
ActiveCell.FormulaR1C1 = "D"
Range("C3:C4").Select
Selection.Copy
Range("C5").Select
Selection.AutoFill Destination:=Range("C5:C" &
ActiveSheet.UsedRange.Rows.Count)


can someone advise me?
 
I

Incidental

Hi there

this code is pretty much straight from the excel help file

Dim SourceRange As Range
Dim FillRange As Range

With Sheets(1)
Set SourceRange = .Range("C3:C4")
Set FillRange = .Range("C3:C32")
SourceRange.AutoFill Destination:=FillRange
End With

Hope this helps

steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top