+ Reply to Thread
Results 1 to 4 of 4

Barcode scan data entry

  1. #1
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Barcode scan data entry

    Hi

    I need assistance on this. I have a scanning system for tracking numbers. So basically the scanner will scan the barcodes and input the numbers. Ok the issue I face is one of the couriers have a 4 digit form number at the end of their 12 tracking number and I need a code to remove the additional 4 digits at the end. Can we input this code into VBA to make it more cleaner. Please see attached file. I've indicated the name of the courier on it.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Barcode scan data entry

    Replacing "Fedex" with "Fedex " avoids risk of running macro twice against same value
    Another way would be to add a column and put a marker in that column when tracking number is amended and check value in that column when macro is run
    Function CDec() is used to avoid Excel converting the values to scientific notation.

    To remove last 4 characters in the active cell:
    Please Login or Register  to view this content.
    To remove last 4 characters in all cells in ColumnD where column C = Fedex:

    Please Login or Register  to view this content.



    To acknowledge help give by anyone remember to click on *Add Reputation

  3. #3
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Barcode scan data entry

    Hi Kev,

    I input the script on the worksheet but column D just rounded up to the nearest figure instead of removing anything more than 12 digits for fedex in column c.
    Fedex only has 12 digits for its tracking numbers. I'm not sure if I'm doing it right.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Barcode scan data entry

    Run in attached workbook with {CTRL} + t (this does all cells in colD)

    Run in attached workbook with {CTRL} + s (this does selected cell only - so need to be in correct cell!)

    Don't forget that after running the macro "FedEx" has become "FedEx " to avoid the macro reducing the cell value by another 4 characters
    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. Barcode scan + print label and save data
    By Exile04 in forum Excel General
    Replies: 1
    Last Post: 02-03-2016, 02:39 AM
  2. textbox scan for barcode
    By mathanraj76 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2015, 02:39 AM
  3. Scan-in, Scan-out tool inventory with barcode scanner
    By rycr023 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2014, 11:52 AM
  4. Barcode info scan to excel
    By BillyG in forum Excel General
    Replies: 4
    Last Post: 03-22-2013, 03:07 AM
  5. Scan barcode and go to next row
    By dsr301 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2012, 11:33 AM
  6. how to scan a barcode into excel
    By hqradio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2011, 04:57 PM
  7. Replies: 0
    Last Post: 11-08-2010, 03:13 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