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.
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.
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.
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