Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default LOOKUP function - I think

Hi

I am trying to set up a worksheet that allows me to type in a question
number in one cell (that the student has got wrong) and in the next cell
gives the answer. Tried looking through the help pages but not sure which
formula to use. I assume that the formula should be in the second cell. I
have about 150 questions I want to use and idealy the answers would be in
another sheet (although not necessarily - they can be just in another
column). For example:

If I type "1" in column A, column B would then say "25" (the answer to
question 1), if I type "2" in column A, column B would then say "36" (the
answer to question 2), etc.

Hope you guys can help.

Thanks a lot.

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default LOOKUP function - I think

On sheet2 in Column A is a list of numbers 1 to 150

In column B is a list of question answers corresponding to the numbers in
column A

On sheet1 in B1 enter =VLOOKUP(A1,Sheet2!$A$1:$B$150,2,FALSE)

Copy down as far as you wish.

Enter numbers in Column A of sheet1 to return question answers from Sheet2


Gord Dibben MS Excel MVP

On Wed, 1 Apr 2009 15:13:01 -0700, UK Mike <UK
wrote:

Hi

I am trying to set up a worksheet that allows me to type in a question
number in one cell (that the student has got wrong) and in the next cell
gives the answer. Tried looking through the help pages but not sure which
formula to use. I assume that the formula should be in the second cell. I
have about 150 questions I want to use and idealy the answers would be in
another sheet (although not necessarily - they can be just in another
column). For example:

If I type "1" in column A, column B would then say "25" (the answer to
question 1), if I type "2" in column A, column B would then say "36" (the
answer to question 2), etc.

Hope you guys can help.

Thanks a lot.

Mike


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default LOOKUP function - I think

Set up a column with the answers to the questions. Let's assume there are 25
questions so there would be 25 answers. Let's assume the 25 answers are in
the range X1:X25.

A1 = answer number you want (from 1 to 25)

This formula entered in B1 will return the corresponding answer:

=INDEX(X1:X25,A1)

You might want to make it more robust by only recognizing values in A1 that
are in fact the numbers 1 to 25.

=IF(AND(INT(N(A1))=A1,A1=1,A1<=25),INDEX(X1:X25,A 1),"Invalid Entry")

--
Biff
Microsoft Excel MVP


"UK Mike" <UK wrote in message
...
Hi

I am trying to set up a worksheet that allows me to type in a question
number in one cell (that the student has got wrong) and in the next cell
gives the answer. Tried looking through the help pages but not sure which
formula to use. I assume that the formula should be in the second cell.
I
have about 150 questions I want to use and idealy the answers would be in
another sheet (although not necessarily - they can be just in another
column). For example:

If I type "1" in column A, column B would then say "25" (the answer to
question 1), if I type "2" in column A, column B would then say "36" (the
answer to question 2), etc.

Hope you guys can help.

Thanks a lot.

Mike



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to combine an IF Function with a lookup function to determine [email protected] Excel Worksheet Functions 1 December 5th 06 06:09 AM
lookup function .... I think??? cameronfunk Excel Worksheet Functions 2 May 31st 06 06:33 PM
lookup function cindy Excel Worksheet Functions 3 April 19th 06 07:28 PM
Pivot table doing a lookup without using the lookup function? NGASGELI Excel Discussion (Misc queries) 0 August 2nd 05 05:08 AM
Lookup Function Johno Excel Worksheet Functions 3 May 12th 05 01:36 PM


All times are GMT +1. The time now is 07:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"