Rotating_Potato
New Member
- Joined
- Oct 9, 2015
- Messages
- 8
<tbody>
[TD="class: votecell"] [/TD]
[TD="class: postcell"]Hi there,
My code is:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"> Sub autofill_dynamic ()
Workbooks ( file_main ). Worksheets ( "sheet1" ). Activate
ActiveSheet . Range ( "R52" ). End ( xlDown ). Activate
ActiveSheet . Range ( ActiveCell , ActiveCell . Offset ( 0 , 198 )). Select
Selection . AutoFill Worksheets ( "sheet1" ). Range ( Selection , Selection . Offset (- 61 , 0 ))
End Sub
</code>What I'm trying to achieve: move to the bottom of the data from the selected cell R52, select all the cells by offsetting to 198 cells, and autofill the table to the top by 61 cells up.
The subroutine provides me with the error 1004 (the operation requires the cells to be identical in size). I did unmerge all cells in the range.[/TD]
[TD="class: votecell"][/TD]
[TD="class: postcell"][/TD]
</tbody>
Last edited: