From the course: Excel: Macros in Depth (Microsoft 365)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using For and For...Next statements

Using For and For...Next statements

From the course: Excel: Macros in Depth (Microsoft 365)

Start my 1-month free trial

Using For and For...Next statements

- [Instructor] We're looking at a workbook that's similar to the one you saw in the previous movie. Three different sheets here, the first one has 42 rows of data, six bits of information about each person. So we've got seven names there. September and October are much bigger, 2,400 rows each. And in the previous movie, we talked about the concept of relative and absolute, and how important it is for certain kinds of macros. What we're going to take advantage of is this idea. We want to record manually the actions, the formatting changes that we want. We want the first three rows of information for each person to be bold, the next three to be italic, and then all over again, three rows of bold, three rows of italic. We've got only 42 rows here and we can do this manually and it's going to be tedious. But, rather doing all 42, let's turn on the macro recorder and go through about three sets of names. And if we do this…

Contents