Thanks so much. You got me going in the right direction. With a little tweak, I got it to work the way I needed. Here is my final version:
I have an external controller that is connected to a laptop. The controller is receiving data from a measuring device. The software on the laptop receives the data from the controller and transfers it to Excel -- I don't how it does it; I just accept that it does. Eventually the data will go through a PLC and will get captured in a data Historian (a SQL database), so the laptop won't be needed. This is just a temporary fix.
Unfortunately, this may not be of any use to me. I have been using Excel 2003, but had to buy a copy of Excel 2007 for the laptop. I did not know that Excel 2007 had 1,048,576 rows. It would take me 12 days to reach the end of a column! I will still use the code anyway. Never know if we want to make a long run.