Reputation: 87
I have a table in google sheets with 4 sheets in the same table. the details table contains the student ID, first name and second name but I would like to lookup the scanned number from the attendance table however the student number needs to match the scanned number.
the student number and the scanned number are both in the attendance table but I would like the scanned number to go into the details table according to the matched student number.
I have tried the following VLOOKUP but I am just getting errors.
=ArrayFormula(IF(LEN(B2:B), VLOOKUP(B2:B,'Student Attendance'!A:F,2,FALSE),))
so in sheet 1 I have scanned number in column B and Student number in column D which is entered through an app. on sheet 2 i have already got the student ID but i would like to lookup the scanned number from sheet 1 and enter accordingly against the correct student ID
I have tried using:
=IFERROR(VLOOKUP(B3:B,'Student Attendance'!A:F,2,TRUE),)
however this is only printing the same scanned number for every unique student number entered.
example data:
attendance sheet:
timestamp, scanned number, class, student number
time/date BARCODE-SCANNED Subject 123456
time/date BARCODE-SCANNED1 Subject 621314
this is all entered through an app so nothing manual here.
details sheet:
scanned number, student number, name
BARCODE-SCANNED 123456 Student name
BARCODE-SCANNED1 621314 Student name
on this sheet the student number and the name is already inputted manually but i would like to get the scanned number from the first sheet according to the student number. at the moment i have only got student number and name in this sheet.
Upvotes: 0
Views: 176
Reputation: 27242
Try
=ARRAYFORMULA (IFERROR(VLOOKUP(B3:B,{'Student Attendance'!D:D, 'Student Attendance'!B:B},2,TRUE),))
The vlookup value should always be in the first column of the lookup range.
Upvotes: 1