UPC Bar Code info in Excel - Page 2
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: UPC Bar Code info in Excel

  1. #11
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Then it shouldn't matter which approach you use.

  2. #12
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If you have to have it as text you could use:

    =IF(LEN(A1)=12,A1,"0"&A1)
    Veni, Vidi, Velcro - I came, I saw, I stuck around

    Taxation WITH representation ain't so hot either

  3. #13
    New Member
    Join Date
    Mar 2002
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes, technically I could format the spreadsheet in the COBOL program. But
    I was trying to get as much of the formatting
    of the information as possible done before creating the *.prn file.

  4. #14
    Board Regular
    Join Date
    Feb 2002
    Location
    Louisville, KY
    Posts
    72
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    So the question before the court is whether you want the UPC stored as a 12 character text entry, or whether the entries can be true numbers which are DISPLAYED as 12 digits regardless the the true number of digits.

    When I send data to our COBOL machine, I have to change every to fixed length text. In this case, you would REPLACE the hyphen with a null (blank), then use =TEXT(a2,"000000000000") to convert the field to true text with 12 real characters; copy down the spreadsheet, then highlight the TEXT formulas, copy, and paste/special/values to remove the formulas. I usually overwrite the original data, but that is your choice.

    When you remove the hypens, Excel sees the entry as a number. If numbers are what you want, as noted above you can create a custom format so that leading zeros are displayed even though they are not present in the number stored in the cell.


  5. #15
    New Member
    Join Date
    Mar 2002
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Storing the UPC as a 12 character text entry
    seems to work.
    The solution I've settled on, is to select the column with the UPC data, replace the hyphens and then format the column as Custom '000000000000'.
    This keeps the leading 0 in place, and it appears to work in the sequential file (I've defined the UPC field in the file as pic x(12)).

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com