Sounds as though you would want to use a random access file.
No real feel for how long it would take. But, if it were able to do 1,000 per
second (which it probably wouldn't be), then that would still take 1,800
seconds, which is 30 minutes. It'd probably be significantly slower than that.
The concept of trying to handle 2 million row arrays inside Excel is just wrong.
You need to rethink your algorithm to eliminate or minimise the array, or move
the whole thing out of Excel into something that has a chance at doing this in a
more efficient way.
Your last comment tends to indicate that you are going about this the wrong way:
"Later on I MAY need to retrieve information from the file for SOME of these
rows" (my emphasis). Why would you produce information that you don't need? Is
this a static data file that can be created once and then used many time?