eHow launches Android app: Get the best of eHow on the go.
Summary: Looping in Microsoft Excel allows users to automate the entry of data into columns and rows. Learn how to create a data loop in Microsoft Excel using the tips from a software developer in this free video about computer technology.
Dave Andrews is a software developer with a business and Web site selling programs and other computer services in Franklin, Tenn. Having worked in the IT industry for more than 8...read more
"Hi, my name is Dave Andrews. Today I'm going to show you how to use looping in Excel. Let's open up Excel by clicking on the start button, go to all programs, Microsoft Office and selecting Excel. Now here's our default Excel spreadsheet that opens up. What I'm going to do is create a loop that will fill in several columns and rows here with data. To do so, let's hold down the alt key on our keyboard and press F11. This opens up the Excel code viewer, that's visual basic. Double click on sheet1 to open the code for d for sheet 1. Next to general, let's select worksheet and then under selection change, let's change it to say, activate. Now we're going to begin typing in our code here. Here we have our completed function. The very first thing I've done is I've created a variable called ws, that's going to point to our worksheet. I've created two integers name row and col for rows and columns. First we set ws variable to point 2 worksheet, sheet 1. Here's where our looping comes into effect. We create a four loop that says, loop row from 1-5 and then for each row, 'cause it's nested inside of this loop, loop col from 1-5. So rows are going to go from 1-5 and columns are going to go from 1-5 and for each row, you're going to go through five columns. This running code right here sets the worksheet so that's in the row that you're currently working with and the column you're currently working with to say, "hello". Now this is in the worksheet activate function. So let's go back to Excel and to activate our worksheet, all we have to do is change down here at the bottom to sheet 2 and then we're going to change back to sheet 1 to activate it. As you can see our "hellos" have been populated. My name is Dave Andrews and I've just showed you how to use looping in Excel."
eHow Article: Looping in Excel