Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Pretty much what I'm trying to accomplish is the following:

Cell F1 is a drop down menu.

If F1 contains the words "whatever", then look up the word in A2 on sheet 2, and input the data in 3rd column.

If F1 contains the words "whatever /1", then look up the word in A2 on sheet 2, and input the data in the 4th column.

If F1 contains the words "whatever /2", then look up the word in A2, on sheet 2, and input the data in the 5th column.

Etc, etc.

I'm guessing I don't need to use the if function, but I'm sure I need to use vlookup.


I was able to figure it out, using a total of 4 IF equations, but when I do, it says "wrong number of arguments to IF".

Here is the equation:

=IF(F1="Test1 1/2",vlookup(A2,Sheet11!A2:F,3,false),
 IF(F1="Test1 2/1",vlookup(A2,Sheet11!A2:F,4,false)),
 IF(F1="Test2 1/2",vlookup(A2,Sheet11!A2:F,5,false)),
 IF(F1="Test2 2/1",vlookup(A2,Sheet11!A2:F,6,false)))

Edit: I figured it out, apparently I have to "nest" the IFs?

Here is the correct equation:

=IF(F1="Test1 1/2",vlookup(A2,Sheet11!A2:F,3,false),
 IF(F1="Test1 2/1",vlookup(A2,Sheet11!A2:F,4,false),
 IF(F1="Test2 1/2",vlookup(A2,Sheet11!A2:F,5,false),
 IF(F1="Test2 2/1",vlookup(A2,Sheet11!A2:F,6,false)))))

(Pretty much changing the parenthesis.)

I'm going to leave this up, just in case someone Google searches for it.

share|improve this question
Please share a doc with us and show us the expected outcome. VLOOKUP is the correct direction, but shifting them into columns is another thing. –  Jacob Jan Tuinstra Apr 11 '13 at 5:50
I went ahead and figured it out on my own. Trial and error, with some searching. –  Brian Apr 11 '13 at 6:49
Perhaps you can answer your own question? That perfectly normal here on Web Applications. We might learn from it !! –  Jacob Jan Tuinstra Apr 11 '13 at 7:03
I've prepared an example file for you, to show you how the VLOOKUP formula works: goo.gl/nfP6K –  Jacob Jan Tuinstra Apr 13 '13 at 20:35

1 Answer 1

According to OP (who seems unlikely to post an answer as such):

Here is the correct equation:

=IF(F1="Test1 1/2",vlookup(A2,Sheet11!A2:F,3,false),IF(F1="Test1 2/1",vlookup(A2,Sheet11!A2:F,4,false),IF(F1="Test2 1/2",vlookup(A2,Sheet11!A2:F,5,false),IF(F1="Test2 2/1",vlookup(A2,Sheet11!A2:F,6,false)))))
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.