duplicate rows

JAWS1

New Member
Joined
Oct 22, 2017
Messages
19
I have had this question before and the macro does not work any more any suggestions the top half is single and the bottom half is where I want to get to.
2591859BIBBYJAMESROSCOESARAH
2691859DURNING ?JAMESCARBERRYANN
2691859HANRATTYOWENHANRATTYANN
2691859McGOWANTHOMASHALLIGANANN
1101859METCALFJOSEPHLOFTUSMARY
8101859MALADYMATTHEWDEAKINELIZABETH
2591859BIBBYJAMESROSCOESARAH
2591859ROSCOESARAHBIBBYJAMES
2691859DURNING JAMESCARBERRYANN
2691859CARBERRYANNDURNING JAMES

<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>
<strike></strike>

<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I can see why the previous suggestions were not working this new data has a pair side by side whereas the last one was a single entry
 
Upvote 0
Try this :- Your data start "A1", Results start "I1".
Code:
[COLOR="Navy"]Sub[/COLOR] MG02Jun23
[COLOR="Navy"]Dim[/COLOR] Ray [COLOR="Navy"]As[/COLOR] Variant, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Col [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
Ray = Range("A1").CurrentRegion
ReDim nRay(1 To UBound(Ray, 1) * 2, 1 To UBound(Ray, 2))
[COLOR="Navy"]For[/COLOR] n = 1 To UBound(Ray, 1)
   c = c + 1
  [COLOR="Navy"]For[/COLOR] Ac = 1 To UBound(Ray, 2)
     nRay(c, Ac) = Ray(n, Ac)
     [COLOR="Navy"]Next[/COLOR] Ac
      c = c + 1
      [COLOR="Navy"]For[/COLOR] Ac = 1 To UBound(Ray, 2)
        [COLOR="Navy"]Select[/COLOR] [COLOR="Navy"]Case[/COLOR] Ac
            [COLOR="Navy"]Case[/COLOR] 4: Col = 6
            [COLOR="Navy"]Case[/COLOR] 5: Col = 7
            [COLOR="Navy"]Case[/COLOR] 6: Col = 4
            [COLOR="Navy"]Case[/COLOR] 7: Col = 5
        [COLOR="Navy"]Case[/COLOR] Else: Col = Ac
        [COLOR="Navy"]End[/COLOR] Select
     nRay(c, Ac) = Ray(n, Col)
   [COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]Next[/COLOR] n
Range("I1").Resize(c, UBound(Ray, 2)).Value = nRay
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,215,460
Messages
6,124,949
Members
449,198
Latest member
MhammadishaqKhan

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