Forum Discussion

Mailutoronto's avatar
Mailutoronto
Copper Contributor
Oct 06, 2021

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

For example:

1. Copied dynamic array:

 

2. pasted into obstructed range:

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!

No RepliesBe the first to reply

Resources