Need to use student ID number to pull student name from another workbook.

gilmoregirlz

New Member
Joined
Aug 14, 2021
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
I'm trying to add this function into a worksheet that was made by someone else several years ago. I've googled and tried different formulas but I'm not having success. I'm not familar with creating functions at all.

Basically I have a worksheet where I want to be able to type in a student id number and have it pull up the students name. The student numbers and names are stored in a worksheet in a completely different file. I tried to copy one of the existing formulas in the sheet and just changed what seemed to be relevant, but Excel (2010) is saying there is an error with the formula. This is what I'm trying:
=IF(B6="","",IF(ISNA(VLOOKUP(B6,'[Book Inventory saved.xls]Students'!$A:$B,2,0)))

Is there anything in this that immediately jumps out as being wrong? I'm totally lost here and really scrambling to try to get this to work before school starts.
B6 is where I want to type the student number and the student name needs to show up in B7. I'm trying to enter the formula into B7. The student names and numbers are in the "Students" worksheet of the Book Inventory saved.xls file. Numbers are in column A 2<, names are in column B2<.

Any help would be SO very much appreciated!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Oops, meant to say that B6 is where I want to type the student number and the student name needs to show up in C6. I'm trying to enter the formula into C6.
 
Upvote 0
Do you have both workbooks open?
Is VBA macro code an option to do this?
 
Upvote 0
Yes, both workbooks are open when I’m trying to add the formula to cell C6. I’m sorry I’m not sure what VBA macro is. I’m on an older version of excel (2010).
 
Upvote 0
Does the following work for you as a formula:

=IF(B6="","",IFERROR(VLOOKUP(B6, '[Book Inventory saved.xls]Students'!A:B, 2, 0),"Student ID#/Name Not found"))
 
Upvote 0
The formula with ISNA would look something like:

=IF(B6="","",IF(ISNA(VLOOKUP(B6, '[Book Inventory saved.xls]Students'!A:B, 2, 0)),"Student ID#/Name Not found",VLOOKUP(B6, '[Book Inventory saved.xls]Students'!A:B, 2)))
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,630
Members
449,041
Latest member
Postman24

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