2

Here is an example of how the data looks, and how I would like it to look

enter image description here

0

You can do it with a macro

Sub Flatten_em()

Dim inRow, outRow, outCol As Integer
Dim CheckVal As String

inRow = 3
outRow = 2

Sheets(1).Select
Rows("1:1").Select
Selection.Copy
Sheets(2).Select
Rows("1:1").Select
ActiveSheet.Paste

Sheets(1).Select
CheckVal = Cells(2, 2)

Range(Cells(2, 1), Cells(2, 7)).Select
Selection Copy
Sheets(2).Select
Cells(outRow, 1).Select
ActiveSheet.Paste

Do Until Cells(inRow, 2) = ""
    outCol = 8
    Do While Cells(inRow, 2) = CheckVal
        Sheets(1).Select
        Range(Cells(inRow, 4), Cells(inRow, 7)).Select
        Sheets(2).Select
        Cells(outRow, outCol).Select
        ActiveSheet.Paste
        outCol = outCol + 4
        inRow = inRow + 1
    Loop
    CheckVal = Sheets(1).Cells(inRow, 2)
    outRow = outRow + 1
Loop
End Sub
|improve this answer|||||
-1

Use the Formula CONCATENATE

For example to merge A3, B3, C3, D3, E3, F3, G3 into the merged cell do the following:

Within the merged cell type the below formula

=CONCATENATE(A3,B3,c3,D3,E3,F3,G3)
|improve this answer|||||
  • I'm not sure that's what they want to do. – Jonno Feb 18 '16 at 11:29
  • Thank you but that is not what I am looking for. I don't want to create one cell. I want to take the duplicate codes in D, E, F, and G and move to the end of the first occurrence of the PLI. Cell B is the unique identifier. Is there a way to do this? – Jessy Kleiner Feb 18 '16 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.