PC Review


Reply
Thread Tools Rate Thread

cannot autofill 2 cells info at the same time

 
 
=?Utf-8?B?SnVuaW9yNzI4?=
Guest
Posts: n/a
 
      9th Nov 2007
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?

 
Reply With Quote
 
 
 
 
Incidental
Guest
Posts: n/a
 
      9th Nov 2007
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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't autofill cells in a column if blank cells in between SJ Microsoft Excel Worksheet Functions 1 4th May 2008 01:27 AM
Autofill for contact info only seems to work half the time BCJOHNSON Windows Vista Mail 1 14th Mar 2007 03:58 AM
where is autofill info stored? Jim Windows XP General 2 21st Dec 2006 09:55 AM
autofill company info =?Utf-8?B?TWFyaw==?= Microsoft Outlook Contacts 1 6th Apr 2006 04:42 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Microsoft Excel Misc 1 17th Jun 2005 08:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:48 AM.