Hi,
I have a sheet with a fragment that looks like this:
Now, if I *manually* select the whole line 3, copy it, and then do "Insert Copied Cells" on the same line, the line will be copied like this:
The merged cell A1-3 will appropriately grow, and the formula range will include the added line as well. That's normal. If I issue following commands in a macro, though:
Rows("3:3").Select
Selection.Copy
Selection.Insert Shift:=xlDown
the result will be different:
How should I write the macro so that insertion would work the 'right' way?
Thanks
I have a sheet with a fragment that looks like this:
Code:
A: B:
line1: +--BIG--+ cellB1
line2: | MERGED| cellB2
line3: +--Cell-+ cellB3
line4: =sum(B1:B3)
Code:
A: B:
line1: +--BIG--+ cellB1
line2: | MERGED| cellB2
line3: + Cell + cellB3
line4: +-------+ cellB3
line5: =sum(B1:B4)
Rows("3:3").Select
Selection.Copy
Selection.Insert Shift:=xlDown
the result will be different:
Code:
A: B:
line1: +--BIG--+ cellB1
line2: | MERGED| cellB2
line3: +--Cell-+ cellB3
line4: +--BIG--+ cellB1
line5: | MERGED| cellB2
line6: +--Cell-+ cellB3
line7: =sum(B4:B6)
Thanks