Special Cells Method

When you press the F5 key in a worksheet, the Go To dialog box appears. You can then click the Special button to show the dialog box in Figure 4-6.

Go To Special


Select @j£pmmentsj O Constants O Formulas

O Row differences O Column differences O Precedents O Dependents

O Blanks O Current region O Current array O Objects

O Last cell O Visible cells onl£ O Conditional formats O Data validation

OK | Cancel

Figure 4-6

This dialog allows you to do a number of useful things, such as find the last cell in the worksheet or all the cells with numbers rather than calculations. As you might expect, all these operations can be carried out in VBA code. Some have their own methods, but most of them can be performed using the SpecialCells method of the Range object.

0 0

Post a comment