From the course: Learning VBA in Excel (2019)
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Refer to cells using the OFFSET function
From the course: Learning VBA in Excel (2019)
Refer to cells using the OFFSET function
- [Instructor] When you create an Excel workbook, you should give it consistent structure, so you know where each data point appears in relation to all of the others. A consistent structure means you can use the distance from one cell to another, called the offset, to refer to cells in foreign .xls and other constructions. I'll demonstrate how to use the offset property in this movie. My sample file is the offset workbook, and you can find it in the chapter five folder of your exercise collection. On this workbook, I have two worksheets. The first is called Suggestion Box, and on it I have boxes for the name, email, and suggestion from a customer. And then, on the second sheet, which I can get to by clicking sheet2, I have a list of previous suggestions with names and email addresses. And I'll use this worksheet to explain the concept of an offset. Let's say we start in cell A1. If A1 is the active cell, then the offset can be rows and columns. One row offset would be cell A2, so it's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.