how can I pull data from one sheet into another using a macro

techcurious

New Member
Joined
Sep 5, 2013
Messages
1
Hi. I am brand new to using macros in Excel 2010 and would appreciate some tips. I am looking to have students scan their bar codes into an Excel form which automatically pulls the name associated with that bar code number and then adds a time and date stamp for in/out. I found a script that seems like it would do the job (http://www.mrexcel.com/forum/excel-questions/672492-scan-barcode-excel-date-time-stamp-out-3.html), but being new I don't think I have it set up correctly. I have pasted the code into a sheet and then a list of all student numbers with last names and first names, but when I click on the A2 cell, I can scan the bar code and it will add the time and date, but the number will not change to a name; infact it doesn't matter what number I scan, it will still place it there and just add the time.

I have attached a screen shot for reference. Many thanks in advance for your help.

Excel 2010
ABCD
TESTMICHAEL
ABBOUDGREGORY
ABELGILLIAN

<tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]123456[/TD]

[TD="align: right"]10[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]223456[/TD]

[TD="align: right"]12[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]323456[/TD]

[TD="align: right"]11[/TD]

</tbody>
Student IDs


Excel 2010
ABCD
NameTime InTime Out

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]123456[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/6/2013 8:46[/TD]
[TD="align: right"]9/6/2013 8:46[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]223456[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/6/2013 8:46[/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]9999[/TD]
[TD="align: right"][/TD]
[TD="align: right"]9/6/2013 8:46[/TD]
[TD="align: right"][/TD]

</tbody>
Attendance
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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