O'Reilly logo

Excel VBA Programming For Dummies, 5th Edition by John Walkenbach, Michael Alexander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Working with Range Objects

IN THIS CHAPTER

Bullet Finding out why Range objects are so important

Bullet Understanding the various ways of referring to ranges

Bullet Discovering some of the most useful Range object properties

Bullet Uncovering some of the most useful Range object methods

This chapter digs a bit deeper into Excel’s dungeons and takes a closer look at Range objects. Excel is all about cells, and the Range object is a container for cells. Why do you need to know so much about Range objects? Because much of the programming work you do in Excel focuses on Range objects.

A Quick Review

A Range object represents a range contained in a Worksheet object. Range objects, like all other objects, have properties (which you can examine and sometimes change) and methods (which perform actions on the object).

A Range object can be as small as a single cell (for example, B4) or as large as every one of the 17,179,869,184 cells in a worksheet (A1:XFD1048576).

When you refer to a Range object, the address is always surrounded by double quotes, like this:

Range("A1:C5")

If the range consists of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required