Input

1   0
7   77
6   66


Expected Output

7   66


= arrayformula(if(B2:C2,B3:C3,B4:C4))


How to do that in Excel?

-
And what is the question? Did you consult the manual? –  mpiktas Oct 17 '11 at 11:40
Clarified question, trying to get the thing in Google Spreadsheet to work in Excel. –  hhh Oct 17 '11 at 11:45
It is still NOT clear because you haven't written what this code is supposed to do; the easiest way to get 7 66 is just to write it ;-) –  mbq Oct 17 '11 at 11:59
Is this really a statistical question? It seems more a "what Excel function do I use to do X?" question (even the function itself doesn't seem to be very statistical). Please identify how this falls under the subjects that would make it on topic for CV or edit your question to make it more clearly on topic. As it stands I think this question is firmly off topic here and should be closed (many questions nearer to being on topic are closed quite quickly). ...(ctd) –  Glen_b Nov 13 at 23:29
(ctd) ... Indeed, if I'd seen it before the bounty was put on it, I'd have already voted to close; with the bounty I'm inclined to see if we can avoid closing it, but unless I've missed something, it's not suitable as is. –  Glen_b Nov 13 at 23:33

## closed as off-topic by whuber♦Nov 14 at 15:30

• This question does not appear to be about statistics within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

$$\begin{array}{c|r|r} & \mbox{B} & \mbox{C} \\ \hline 2 & 1 & 0 \\ 3 & 7 & 77 \\ 4 & 6 & 66 \\ \end{array}$$
For a given column, the if condition (if(B2:C2,B3:C3,B4:C4)) means: if the value in row 2 is true (or 1) then return the value at row 3 else return the value at row 4.
You can achieve this in Excel by typing (in B6, for example) =IF(B2,B3,B4), selecting B6:C6 and using "Fill right" (or by dragging the fill handle at the bottom right corner of the initial cell when expanding the selection).