+ Reply to Thread
Results 1 to 3 of 3

Need Help on How to Auto Paste Value(s)?

  1. #1
    Registered User
    Join Date
    10-20-2013
    Location
    New Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    11

    Need Help on How to Auto Paste Value(s)?

    I already have some VBA in the spreadsheet so I don't want to mess it up and I am afraid
    to try some results I've found on the web elsewhere that might mess it up, which is why I'm
    posting my specific issue.

    The existing spreadsheet is designed to do the following:

    We have a mixed box of product, so the spreadsheet is used to sort the product from
    the box by removing each piece and scanning the barcode of the product (spreadsheet is
    manufacturer specific).

    Anyways, the barcode is 23 Characters, within the barcode itself lies the Part Number
    (PN) of this particular mfr.

    The scan is then broken down utilizing 2 adjacent cells to break it down to show the
    PN:

    Column B uses =LEFT(A2,8) to show only the first 8 characters of the scan
    Column C uses =RIGHT(B2,5) to show only the last 5 digits of the previous result (the PN).

    Within the spreadsheet both columns B & C forumla's are repeated as shown above all the
    way through to row 5001 (to ensure the sheet is long enough for many items).

    Next there is a VBA code that automatically sorts the scanned barcodes in column A so
    that if multiple scans result in the same PN in column C, then they would
    all be grouped together.


    Please Login or Register  to view this content.

    All this works fine except I want to take it one step further and have an additional
    column which has the actual value pasted of all of column C's results in Column D
    (D2:D5001).

    This way the user can utilize Column D to copy and paste from it into a program that
    will search our database for that number so we can either add quantities to our
    DBs inventory and/or add a new item and then input the quantities to our inventory.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Need Help on How to Auto Paste Value(s)?

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    10-20-2013
    Location
    New Hampshire
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Need Help on How to Auto Paste Value(s)?

    I appreciate the effort, but the code you provided conflicts with the one I posted (the first line where it reads "Private Sub... ...Range)). I did however find another one that works, and this is what I now have:

    Please Login or Register  to view this content.
    Though the above does what I want, there seems to be an unforeseen side effect. When I was testing it out, I scanned some barcodes and after the scan it would go to the next column. I changed the layout somewhat so that all the functions being performed were in the third and fourth columns, but the final pasted value is actually in the second column just to make it easier for other users. I also hid the third and fourth columns so it would be less confusing to newer users.

    To check myself in regards to the issue I am having with it going into the second column, I rescanned the bar code for the scanner itself to ensure it was using a carriage return and not a tab after the scan, but it still goes to the second column. I even tried another method I found of protecting the columns so no changes would occur, but that isn't working either.

    Is there some way I can get this to be more user friendly whereas the user only needs to scan each barcode, the next active cell to scan in becomes the below cell, the adjacent cells in the next column indicate the resulting value and all the while the sheet auto sorts?

+ 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. Auto run macro from paste or paste special in to specific cell
    By Craig Muir in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2014, 10:00 AM
  2. Auto cut-paste
    By kberzins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2012, 02:05 PM
  3. Auto cut and paste
    By Donga00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2011, 01:26 AM
  4. Auto copy and paste value
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2011, 11:56 AM
  5. How can I auto-paste formula downwards
    By kirangole in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2009, 04:00 AM
  6. Cut/copy and auto-paste
    By duffsparky in forum Excel General
    Replies: 0
    Last Post: 05-06-2007, 07:29 AM
  7. auto cut and paste...
    By cjjoo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-26-2005, 11:05 PM

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