E
Edward Scott
hi,
I am trying to automate an autofill. I can usually do this just fine,
but this time it is across merged cells, which always causes an error.
in the spreadsheet, every three columns are merged (e.g. A1,B1,C1 are
merged; D1,E1,F1 are merged etc.). my code looks like this:
'find the last cell in the row with text in it
Set SourceRange = Range("C1").End(xlToRight)
'set the fill range
Set fillRange = Range("C1").End(xlToRight).Resize(1, 6)
'use autofill
SourceRange.AutoFill Destination:=fillRange
when I get to the autofill line I get a Run-time error 1004: "This
operation required the merged cells to be identically sized"
my merged cells are identically sized. I have tried selecting the
source and fill range to make sure they point to the right ranges,
which they do. I have tried other methods of selecting the same cells,
but it makes no difference.
can anyone help
I am trying to automate an autofill. I can usually do this just fine,
but this time it is across merged cells, which always causes an error.
in the spreadsheet, every three columns are merged (e.g. A1,B1,C1 are
merged; D1,E1,F1 are merged etc.). my code looks like this:
'find the last cell in the row with text in it
Set SourceRange = Range("C1").End(xlToRight)
'set the fill range
Set fillRange = Range("C1").End(xlToRight).Resize(1, 6)
'use autofill
SourceRange.AutoFill Destination:=fillRange
when I get to the autofill line I get a Run-time error 1004: "This
operation required the merged cells to be identically sized"
my merged cells are identically sized. I have tried selecting the
source and fill range to make sure they point to the right ranges,
which they do. I have tried other methods of selecting the same cells,
but it makes no difference.
can anyone help