
Use the ISODD and COLUMN functions to
determine odd columns
In this example, we want to determine whether a column’s index in
a range is even or odd, and then fill each odd row with the character
“X”. Use the ISODD function in combination with IF and
COLUMN() to get the result shown in Figure 6-35. If this function
is not available and returns an error, install and load the Analysis
ToolPak add-in.
4
To determine odd columns:
1. Select cells A1:E11 and type the following formula:
=IF(ISODD(COLUMN()),"X","").
2. Press <Ctrl+Enter>.
Note: To mark even columns, type the following formula:
=IF(ISEVEN(COLUMN()),"X","").
180 Chapter 6
Figure 6-35