+ Reply to Thread
Results 1 to 10 of 10

NEWB needs help sorting data

  1. #1
    Registered User
    Join Date
    05-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    10

    NEWB needs help sorting data

    Still teaching myself VBA but I have a problem and have no idea how to tackle it.

    I have a bunch of 3D coordinate (X,Y,Z) barcodes scanned into excel and need them sorted into specific columns based on the direction represented by the first letter (X,Y,Z) in the barcode. A set of data has an X, Y, Z coordinate and is bookmarked by "END" scans.The scans come in like below and the user can scan in any order as long as he bookmarks each data set with an "END" scan.

    X1234
    Y3242
    Z2342
    END
    Z6546
    X654
    Y5435
    END
    Y6544
    X65445
    Z5335
    END

    I need a macro that can sort the scans into this format:
    X1234 Y3242 Z2342
    X654 Y5435 Z6546
    X65445 Y6544 Z5335

    Any help would be much appreciated. Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    04-03-2012
    Location
    Washington State
    MS-Off Ver
    Excel 365
    Posts
    340

    Re: NEWB needs help sorting data

    Are you trying to scan the parts and have them go to the right? Or you just need to sort them this way after they are scanned? Are you using any kind of input form? Or straight into the sheet?

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: NEWB needs help sorting data

    If you set the Move after enter direction to right, lock all but the first four columns, and then protect the worksheet, it should scan in exactly in that fashion (with the End values appearing in col D).
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    05-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: NEWB needs help sorting data

    The sheet is already populated so I just need a macro that sorts the sheet.

  5. #5
    Registered User
    Join Date
    05-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: NEWB needs help sorting data

    Quote Originally Posted by shg View Post
    If you set the Move after enter direction to right, lock all but the first four columns, and then protect the worksheet, it should scan in exactly in that fashion (with the End values appearing in col D).
    The barcodes are batch scanned and downloaded. The program that came with the scanner downloads the scans in one column. I don't have any way to change the format it downloads.
    Last edited by importriders; 05-06-2013 at 08:03 PM.

  6. #6
    Registered User
    Join Date
    05-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: NEWB needs help sorting data

    I should clarify I want the user to be able to scan XYZ in any order.

    For the sorted data it will be a collection of nodes. Node being an XYZ coordinate data set. Each row represents a NODE with the corresponding XYZ columns in that order. Hope that makes sense.

    I added the END barcode to separate the different nodes or else it would just be a list of XYZ.

  7. #7
    Registered User
    Join Date
    05-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: NEWB needs help sorting data

    Anyone have any ideas?

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: NEWB needs help sorting data

    Maybe ...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-06-2013
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: NEWB needs help sorting data

    Thanks this worked out great!

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: NEWB needs help sorting data

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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