Find and copy
I don't see any way to correlate the badge number scanned in with either of
the two items of information on the second sheet. To do this automatically
you need to have the badge number over in the second sheet also. Idealy the
setup would be (for the second sheet) 3 columns, with first column (A?)
holding the badge ID assigned, then next column could have employee name and
third column with their ID number. 2nd and 3rd columns could be other way
around, key is to have the badge number in the leftmost column of that
'table'.
Then back on the first sheet where the badge scanner is going to put the
scanned number into column A, you set up a VLOOKUP() formula in columns B and
C.
For this example we will say that you have 100 employees and their badge #s,
names and ID #s are in A1:C100 on the second sheet, with badge number in A,
name in B and ID # in C.
On first sheet in, assuming labels in row 1, data starting in row 2, put
this into B2
=IF(A20,VLOOKUP(A2,'Sheet2'!$A$1:$C$100,2,FALSE), "")
and in C2 put this
=IF(A20,VLOOKUP(A2,'Sheet2'!$A$1:$C$100,3,FALSE), "")
then fill the formulas on down the sheet. When an entry is made into column
A on that first sheet, you will either see the name and ID # for the matching
employee show up in B and C or you will see #N/A in those cells if the
scanned in badge number does not match an entry in the table on the second
sheet. We could hide the "#N/A" error - but in this case it serves as an
alert that either the scanner did not read the badge properly or that the
badge used is not assigned to someone in your employee list.
"Rodjk #613" wrote:
Hello,
Ok, I have a spreadsheet with two worksheets.
The second sheet will be employee names and ID numbers.
The first sheet will be set up to use a badge ID scanner.
The scanner will read the bar code on the badge, then input the badge
number to column A.
What I would like is a Macro of some sort that will fill in column B
and C with the ID Number and the Name of the employee. (The badge
number and the ID number are different.)
Is this possible?
Thanks
Rod
|