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 the image below. If this function is not available and returns an error, install and load the Analysis
ToolPak add-in.
To determine odd columns:
- Select cells A1:E11 and type the following formula: =IF(ISODD(COLUMN()),”X”,”").
- Press Ctrl+Enter.
To mark even columns, type the following formula: =IF(ISEVEN(COLUMN()),”X”,”").
This tip is compatible with Excel 97, 2000, 2003 and 2007.
- How to Use the ISODD and ROW functions to determine odd rows
- Use the ISEVEN and ISODD functions to check if a number is even or odd
- Use the EVEN and ODD functions to determine the nearest even/odd value
- Use the INDEX, MATCH, and LARGE functions to determine the best salesperson
- How to count sets of cells located in two columns in Excel
