Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default cannot autofill 2 cells info at the same time

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default cannot autofill 2 cells info at the same time

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cell info and info in range of cells on new entry abc[_2_] Excel Discussion (Misc queries) 5 February 15th 10 08:21 PM
Copy info into empty cells below info, until finds cell with new d Fat Jack Utah Excel Discussion (Misc queries) 3 November 16th 08 08:34 PM
Link info in one cell to info in several cells in another column (like a database) hansdiddy Excel Discussion (Misc queries) 1 February 22nd 06 02:27 AM
Formula to Autofill Info based on Other Data SamanthaM Excel Discussion (Misc queries) 1 October 5th 05 08:55 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM


All times are GMT +1. The time now is 01:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"