Lookup - what am I doing wrong?

meredithsegal

New Member
Joined
Oct 10, 2011
Messages
38
I have multiple sheets as part of a workbook. Several sheets contain master data about students. There are then sheets about each individual student that need to pull data based on the master sheets.

The student's name always appears in cell B2 of the sheet about that student.

I have a sheet called "attendance" where students names are listed in column A and their attendance is listed in column B.

For the field where I need to include attendance (H3), my formula is:
=LOOKUP(B2,Attendance!A1:A17,Attendance!B1:B17)

When I change the name in B2, the function does not update unless I go back to the H3, hit enter, etc. Even then, it is very erratic. What's going on?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I have multiple sheets as part of a workbook. Several sheets contain master data about students. There are then sheets about each individual student that need to pull data based on the master sheets.

The student's name always appears in cell B2 of the sheet about that student.

I have a sheet called "attendance" where students names are listed in column A and their attendance is listed in column B.

For the field where I need to include attendance (H3), my formula is:
=LOOKUP(B2,Attendance!A1:A17,Attendance!B1:B17)

When I change the name in B2, the function does not update unless I go back to the H3, hit enter, etc. Even then, it is very erratic. What's going on?
Are you sure you want to use LOOKUP?

See if this makes a difference:

=VLOOKUP(B2,Attendance!A1:B17,2,0)

Makes sure calculation is set to Automatic.
 
Upvote 0
What is the difference between Lookup and Vlookup? And what would I do when I need to pull data from a non-adjacent column? (student's name is in A, given data set is in D). Thanks so much!
 
Upvote 0
What is the difference between Lookup and Vlookup? And what would I do when I need to pull data from a non-adjacent column? (student's name is in A, given data set is in D). Thanks so much!
The biggest difference is that the LOOKUP function requires the range of lookup values be sorted in ascending order for the function to work properly. If the range of lookup values are not sorted in ascending order there's no telling what result you will get.

Typically, LOOKUP is used to lookup numeric values although it can be used to lookup text and for other specialized applications.

With VLOOKUP, you have the option of using sorted data or not.

If your lookup values are in column A and the value to be returned is in column D then you would probably use something like this:

=VLOOKUP(B2,Attendance!A1:D17,4,0)

See this for more info on how to use VLOOKUP:

http://contextures.com/xlFunctions02.html
 
Upvote 0

Forum statistics

Threads
1,222,017
Messages
6,163,411
Members
451,835
Latest member
kristianb63

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top