Scan barcode to excel with date & time stamp in & out.

qpywsqp

New Member
Joined
Dec 2, 2012
Messages
26
Hi all. I have research around the internet and finally found out Macro able to solve my issue. But im totally not a programmer. Hopefully someone can help me on this.

I will scan QR Code with a scanner to cell A1 and wanted cell C1 to have date and time stamp for IN. When Scanner scan the same QR Code, D1 will have date and time stamp for out. If repeat third time scanning the same QR code after a few scanning, it will appear on next row. Which means A8 with the code and C8 with date and time stamp for IN again.

Is that possible to done with Macro?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
theburrow,

When I attempted to download/open your workbook 'ACCESS LOG.xlsx' I received the following message:

Microsoft Office Excel
Circular Regerence Warning

One or more formulas contain a circular reference and may not calculate correctly.......


Maybe someone else on MrExcel will be able to help you.


Please see Rule #12 at the next link on how to continue with your thread.

https://www.mrexcel.com/forum/board-announcements/99490-forum-rules.html
 
Upvote 0
Hello,

Would it be possible to modify the code in Reply #18 to require a 2nd input in cell B for an order number? The code would then look up both the name and order number and apply the same logic to fill in the in/out portion? If no match between the two, it would add Name and Order to the first blank cell in Columns A and B respectively.

A finished table for the day might look like this.

NameOrderTime OutTime In
Jim092617-19/26/2017 11:329/26/2017 14:31
John092617-29/26/2017 11:339/26/2017 14:45
Jake092617-39/26/2017 11:339/26/2017 12:55
Jeff092617-49/26/2017 11:349/26/2017 15:15
Jack092617-39/26/2017 12:569/26/2017 14:50
Jim092617-59/26/2017 14:329/26/2017 18:22
John092617-69/26/2017 14:469/26/2017 18:44
Jack092617-79/26/2017 14:519/26/2017 18:42
Jeff092617-89/26/2017 15:179/26/2017 16:41
Jason092617-99/26/2017 17:009/26/2017 21:02
James092617-89/26/2017 17:009/26/2017 19:10
Jordan092617-109/26/2017 17:029/26/2017 21:22
James092617-119/26/2017 19:159/26/2017 22:58

<tbody>
</tbody>


Thanks for any help!
 
Upvote 0
MadeFromMetal,

Welcome to the MrExcel forum.


The code would then look up both the name and order number

I assume that the list for name, and, number, are in another worksheet.

In order to continue, I would have to see your actual workbook, containing the two worksheets.

You can post your workbook/worksheets to the following free site (sensitive data changed), mark the workbook for sharing, and, provide us with a link to your workbook:

https://dropbox.com
 
Last edited:
Upvote 0
Hiker95,

No lookup in another worksheet, just within the same one.

The Names and Order Numbers will/may be different from day to day.

It should only look within the same worksheet for a Name-Order pair match.

If it does not find one, it adds the new Name-Order pair to cells A and B of the next available row, then adds a time stamp in column C of that row. Much how the code in Reply 18 of this thread looks for a Name Match in the same worksheet.

If it does find a match, that means there is already a time stamp in the Time Out column (column C) so it would add a time stamp into Time In (Column D) of the row that the Name-Order pair already exists.

This is for Windows 10, Excel 2016 if that helps.

Thanks again for your help.
 
Upvote 0
There was no original table. The table would start blank with the headers, like so.
NameOrderTime OutTime In

<tbody>
</tbody>


But the progression would look like this.

1. Jim scans his name
NameOrderTime OutTime In
Jim

<tbody>
</tbody>

2. Jim scans the order number and a time stamp populates

NameOrderTime OutTime In
Jim092617-19/26/2017 11:32

<tbody>
</tbody>


3. John scans his name
NameOrderTime OutTime In
Jim092617-19/26/2017 11:32
John

<tbody>
</tbody>

4. John scans his order
NameOrderTime OutTime In
Jim092617-19/26/2017 11:32
John092617-29/26/2017 11:33

<tbody>
</tbody>

5. Jim gets done with his order and turns it in so he scans his name.


NameOrderTime OutTime In
Jim092617-19/26/2017 11:32
John092617-29/26/2017 11:33
Jim

<tbody>
</tbody>


6. Jim scans the order he is turning in, and the code recognizes the name/order pair in the cells above and adds a time stamp to column D, then deletes Jim's name from the cell.

NameOrderTime OutTime In
Jim092617-19/26/2017 11:329/26/2017 14:31
John092617-29/26/2017 11:33

<tbody>
</tbody>

7. Jim grabs another order and scans his name.
NameOrderTime OutTime In
Jim092617-19/26/2017 11:329/26/2017 14:31
John092617-29/26/2017 11:33
Jim

<tbody>
</tbody>



8. Then Jim scans the New order. The code does not see a name/order pair match in the cells above so it adds a time stamp into column C.

NameOrderTime OutTime In
Jim092617-19/26/2017 11:329/26/2017 14:31
John092617-29/26/2017 11:33
Jim092617-39/26/2017 14:32

<tbody>
</tbody>



That would be the end of the code. It would just treat every pair of scans with the same logic as above. I hope this makes sense.
 
Upvote 0
MadeFromMetal,

I have attempted several times to understand your work progression, but, I can not see the logic to solve your request.

Maybe someone else on MrExcel will be able to help you.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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