Hello
I am currently writing a code to generate labels from a spreadsheet of data. At the minute the various strings are made up from cells in Row 2 on Sheet1. I would like this to continue down until the last row of text in Column B. The output looks like I want it to however I would like it to generate output for each row in column B on Sheet 1 to each row in Column A on Sheet2.
Sub Concatenate2()
Dim String1 As String
Dim String2 As String
Dim String3 As String
Dim String4 As String
Dim String5 As String
Dim String 6 As String
Dim full_string As String
String1 = Sheet1.Cells(2, 20).Value
String2 = Sheet1.Cells(2, 2).Value
String3 = Sheet1.Cells(2, 4).Value
String4 = Sheet1.Cells(2, 6).Value
String5 = Sheet1.Cells(2, 5).Value
String6 = Sheet1.Cells(2, 15).Value
Sheet2.Cells(1, 1).Value = String1 & vbNewLine & vbNewLine & String2 & vbNewLine & "QTY- " & String3 & vbNewLine & String4 & "mm " & String5 & vbNewLine & String6
End Sub
Any help greatly appreciated
thanks
Daniel
I am currently writing a code to generate labels from a spreadsheet of data. At the minute the various strings are made up from cells in Row 2 on Sheet1. I would like this to continue down until the last row of text in Column B. The output looks like I want it to however I would like it to generate output for each row in column B on Sheet 1 to each row in Column A on Sheet2.
Sub Concatenate2()
Dim String1 As String
Dim String2 As String
Dim String3 As String
Dim String4 As String
Dim String5 As String
Dim String 6 As String
Dim full_string As String
String1 = Sheet1.Cells(2, 20).Value
String2 = Sheet1.Cells(2, 2).Value
String3 = Sheet1.Cells(2, 4).Value
String4 = Sheet1.Cells(2, 6).Value
String5 = Sheet1.Cells(2, 5).Value
String6 = Sheet1.Cells(2, 15).Value
Sheet2.Cells(1, 1).Value = String1 & vbNewLine & vbNewLine & String2 & vbNewLine & "QTY- " & String3 & vbNewLine & String4 & "mm " & String5 & vbNewLine & String6
End Sub
Any help greatly appreciated
thanks
Daniel