Hi Brian,
Here's how it works:
C2: IF(MOD(COLUMN(),2)=0,"",CHOOSE(A2,2,3,1))
Formulas work left to right, aand from the innermost set of parentheses to the outermost set.
COLUMN() returns the number of the column containing the formula. For the first copy of this formula, COLUMN returns 3
MOD(a,b) Divides a by b and returns the remainder. For Column C, and all other odd numbered columns, the remainder is 1. For even numbered columns, the remainder when divided by 2 is 0.
IF has three parts, separated by commas: if-expression,if-true,if-false
if-expression is MOD(COLUMN(),2)=0
The expression will return TRUE for even numbered columns, and FALSE for odd numbered columns.
if-true, IF places a null string ( "" ) in its cell, and exits.
if-false, IF calls CHOOSE
CHOOSE has several parts: CHOOSE(index,choice1,choice2,…)
Index is an integer. In C2, the integer in cell A2, two cells to the left of C2, is one ( 1 )
choice 1 is the integer 2, so the formula returns 2 in cell C2.
A2 'relative' reference, so as the formula is filled right into other cells in row 2, the column part of the reference will increment to remain on the cell in the same position, relative to the cell containing each copy of the formula.
In E2, the formula will get the 2 in cell C2, and CHOOSE will choose choice 2 (which is the number 3)
In G2, the formula will get the 3 in cell E2, and CHOOSE will choose choice 1 (which is the number 1), beginning the sequence again.
Regards,
Barry