Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Tokyo, Japan
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel file as a source for bar code label (Excel 2002)

    I'm in the process of printing thousands of barcode label. From our book database I extracted 3 fields for this purpose (Title, ISBN, No. of Copies) and converted it to an excel file. This will serve as the source for my bar code labeling software. I just need the Title and ISBN fields on the label. I have one problem though because in many instances I need to print multiple copies of the same label. I need to print this labels alphabetically based on the Title of the books. If the book has 3 copies I also need to print 3 labels. I want to print this labels continously and to do this using the extracted datasource I have to modify the excel file by inserting multiple records to match the total copies column. I have attached the file to help make clear what I want to accomplish. Could anybody help. TIA

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Excel file as a source for bar code label (Excel 2002)

    Try this macro:

    Sub MultipleCopies()
    Dim lngMaxRow As Long
    Dim lngRow As Long
    Dim lngCopies As Long
    lngMaxRow = Range("A" & Cells.Rows.Count).End(xlUp).Row
    For lngRow = lngMaxRow To 2 Step -1
    lngCopies = Range("C" & lngRow)
    If lngCopies > 1 Then
    Range("A" & lngRow & ":C" & lngRow).Copy
    Range("A" & (lngRow + 1) & ":C" & _
    (lngRow + lngCopies - 1)).Insert Shift:=xlShiftDown
    End If
    Next lngRow
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Tokyo, Japan
    Posts
    203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel file as a source for bar code label (Excel 2002)

    This is great Hans. Thank you as always.

Posting Permissions

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