+ Reply to Thread
Results 1 to 3 of 3

Scan SN > search for match > put date/time

  1. #1
    Registered User
    Join Date
    01-17-2019
    Location
    Czech Republic
    MS-Off Ver
    2010
    Posts
    2

    Scan SN > search for match > put date/time

    Hi,

    I'm totally new in Excel and VBA, so excuse me with my request to provide to me "as is ready" code.

    What I have - an excel sheet with SNs in column e.g. A1 ~ A500, and names in column B1 ~ B500
    What I want to achieve -
    a) if scanned SN match some SN of range A1~A500 mark it as green + set date/time in corresponding cell in C row (arrive)
    b) if scanned SN match some SN of range A1~A500 at 2nd time mark it as red + set date/time in corresponding cell in D row (leave)
    To achieve it, we can setup some trigger somewhere in this or other sheet, e.g. in corresponding cell E put 1 after 1st match, 2 after 2nd.
    c) is there possibility to prepare some worksheet with some input's filed/sheet etc? Cause I believe the variable (scanned SN) must be in
    some cell e.g. X1, right? I don't want to see the X1, X2, etc scanned SNs, but rather some "GUI" which will do next:
    - after 1st scan, if SN match will popup that "name from corresponding cell B" arrived message
    - leave empty filed and wait/sleep 2 seconds before next scan
    - after 2nd scan SN match will popup that "name from corresponding cell B" left message
    - if SN do not match popup "please try scan again, or so" message
    - if 3rd scan, maybe again arrived + set date/time to another cell?
    - if 4th scan, maybe again leaved + set date/time to another cell?

    Many thanks in advance for help.

    Regards
    jyndros

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Scan SN > search for match > put date/time

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-17-2019
    Location
    Czech Republic
    MS-Off Ver
    2010
    Posts
    2

    Re: Scan SN > search for match > put date/time

    Hi,

    I found similar topic, so I just adjust vba a little and it works quite well.
    Maybe one thing can be fixed - once scanned SN do not match SN in "Registered" sheet - it will be written to A column in "Attend" sheet anyway - this is because of:
    'Write the Card SN to A column in Attend sheet:
    Range("A" & SearchRange.Rows.Count + 1).Value = Item
    But I can live with it if fix this is not so easy.

    regards
    jyndros
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel - Macro to scan folder for new files and append title of document with date time
    By swilson2006 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2018, 01:27 PM
  2. RFID Time and date stamp on scan and off scan
    By forey89 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2015, 06:46 AM
  3. Replies: 1
    Last Post: 06-17-2015, 11:00 PM
  4. Scan-Search-Print in excel
    By Monoku in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2014, 11:28 PM
  5. RFID Time and date stamp on scan
    By surfershort in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-27-2014, 02:57 PM
  6. Need macros to scan and match numbers
    By beberamos in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2013, 03:39 PM
  7. VBA code help. Using command box. Search/autofill/scan
    By mcghue in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2013, 08:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1