Can you auto insert/delete rows beneath and push everything else away to accommodate spill range?

Copper Contributor

For example:

1. Copied dynamic array:

Screenshot 2021-10-05 070308.png

 

2. pasted into obstructed range:

Screenshot 2021-10-05 070636.png

I do this because I have uncertainty about what the maximum rows I'll need.
Someone hinted that you can make the array appear on a different sheet, count the rows in the array from VBA, insert the rows into the main sheet, then have the formula copied into where I want it.

 

I'm very new to VBA and the only codes that I found that counts the rows is "MsgBox ActiveSheet.UsedRange.Columns.Count". However, this only provides a message box with the number of rows counted. I got his from Automateexcel. 

 

Thanks in advance!

0 Replies