Consulting

Results 1 to 3 of 3

Thread: Want to fill data from Excel in to specific Form for Print Lable.

  1. #1

    Question Want to fill data from Excel in to specific Form for Print Lable.

    I have data in excel i want to fill those particular data automatically into specific form for label print. 2 label in to A4 Page.
    Order File Data want to fill in to Envelope format.

    Many Many Thanks in Advance.
    Attached Files Attached Files

  2. #2
    VBAX Expert
    Joined
    May 2016
    Posts
    604
    Location
    I had a look at your two workbooks and it is not at all clear what you want: there doesn't seem to be any correlation between the headers in the Order file and any of the items in the Envelop format_final. Moving the data would be very easy if I knew what data needed to be copied from where to where.

  3. #3
    VBAX Expert
    Joined
    May 2016
    Posts
    604
    Location
    Here is a generic macro to move data around as you specify. I have used another worksheet called " Config" to define where each item will go on the "envelope sheet"

    Remarks ID ORDER DATE SHIP DATE
    I22 I9 J7 I21


    etc for all columns
    Sub copydata()
    With Worksheets("Config")
    Mapping = Range(.Cells(2, 1), .Cells(2, 40))
    End With
    With Worksheets("ORDER")
    lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
    inarr = Range(.Cells(1, 1), .Cells(lastrow, 40))
    End With
     Worksheets("Envelope").Select
       
    For i = 2 To lastrow
      For k = 1 To 30
        Rangestr = Mapping(1, k) & ":" & Mapping(1, k)
        Range(Rangestr) = inarr(i, k)
      Next k
    ' post the envelope here, I am not sure what you want done at this point
    
    
    Next i
    
    
    End Sub

Tags for this Thread

Posting Permissions

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