Excel rows to columns - certificates

stevejpearson

Board Regular
Joined
Oct 31, 2009
Messages
64
Dear all,

I need to print 100's of certificates and want to run a mail merge. However, I currently have a column of names and then the certificates the names are receiving appear in the same row as the name e.g. row 2 has won awards for progress in art and DT and in achievement for Maths and French. To run the mail merge I really need the names to be repeated on different rows with the name of the award appearing in the next column e.g.

Name 1 Art Progress
Name 1 DT Progress
Name 1 Maths Achievement
Name 1 French Achievement

Can anyone help? Is there a quick way to do this!? You can view the file here:

https://docs.google.com/open?id=0B2kA5LQXm97jc3Ftc1pFaFc4SkU

Thanks

Steve
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
This adds a new sheet with the results.
Code:
Sub NewGoalSheet()
Dim WS As Worksheet
Dim MyArray As Variant
Dim NewArray() As Variant
Dim LastRow As Long
Dim CTR As Long
Dim A As Long
Dim B As Long

Set WS = ActiveWorkbook.Worksheets("P& A nominations")
With WS
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row

MyArray = .Range("B2:AK" & LastRow)
ReDim NewArray(1 To LastRow * 4, 1 To 2)
CTR = 1
For A = 1 To UBound(MyArray)
    For B = 7 To UBound(MyArray, 2)
        If MyArray(A, B) <> "" Then
            NewArray(CTR, 1) = MyArray(A, 1)
            NewArray(CTR, 2) = MyArray(A, B)
            CTR = CTR + 1
        End If
    Next
Next

Set WS = Worksheets.Add
WS.Cells.Resize(CTR, 2).Value = NewArray
End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,457
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top