![]() |
Autofill Dynamic Range of Cells
I'm trying to do an autofill on a dynamic range of cells, and I'm having some trouble. Here is what I have so far:
Code:
Range("CR2:DC2").Select |
Autofill Dynamic Range of Cells
Hi Keri,
This worked for me: LastRow = ActiveSheet.Range("A1").End(xlDown).Row Range("CR2:DC2").AutoFill Destination:=Range("CR2:DC" & LastRow) -Ben |
Autofill Dynamic Range of Cells
Hi
I maybe on the wrong track here but try this. Sub Copy_myRng() Dim SS As Worksheet 'Source Dim TS As Worksheet 'Target Dim mySrng As Range Dim myTrng As Range With Application .ScreenUpdating = False .EnableEvents = False End With Set SS = Sheets("Sheet1") Set mySrng = SS.Range("CR2:DC2") Set TS = Sheets("Sheet2") Set myTrng = TS.Range("A1") With mySrng .Copy Destination:=myTrng End With With Application .ScreenUpdating = True .EnableEvents = True End With End Sub HTH Mick. |
All times are GMT +1. The time now is 05:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com