FreeOfficeTutorials.com logo
Main Page

Microsoft Excel 5D: Offsets and Loops in Macro Programming

Overview

Offset:

  • An offset is used in computer code to select a cell that is beside, under or over another cell that is currently highlighted.
    • Example: if cell B5 is currently highlighted and you want to highlight the cell one to the right the offset method would be: Selection.Offset(1,0).Select

Loops:

  • Loops are used all the time in all computer programs. A loop will keep executing a line of code over and over until something happens.
    • Example: a loop may be used in a program to keep popping up an input box until the user enters in the correct information like a security password. Once the correct password is executed the loop stops and the program goes onto something else.

 

This website is copyright protected see contact page for details.

 

 

stepbystep