Two lists from one.

boomshaka

New Member
Joined
Jun 28, 2018
Messages
10
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
I need help turning one list into two. Can you help?

[TABLE="width: 451"]
<colgroup><col><col><col span="3"><col><col></colgroup><tbody>[TR]
[TD="colspan: 2"]Original List [/TD]
[TD] [/TD]
[TD="align: left"]List 1[/TD]
[TD] [/TD]
[TD="align: left"]List 2 [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 1[/TD]
[TD] [/TD]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO1[/TD]
[TD="align: left"]Break Even [/TD]
[TD="align: left"]PO2[/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 2[/TD]
[TD] [/TD]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO2[/TD]
[TD="align: left"]Break Even [/TD]
[TD="align: left"]PO3[/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 8[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 9[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 10[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 12[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 13[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 14[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Break Even[/TD]
[TD="align: left"]PO 15[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: left"]Planned [/TD]
[TD="align: left"]PO 16[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi & welcome to MrExcel
How about
Code:
Sub Make2Lists()
   Dim Ar As Areas
   Dim Rng As Range
   Dim i As Long, j As Long
   Dim Ary As Variant
   
   j = 4
   Ary = Array("Planned", "Break Even")
   For i = 0 To UBound(Ary)
      With Range("A:A")
         .Replace Ary(i), True, xlWhole, , False, , False, False
         Set Ar = .SpecialCells(xlConstants, xlLogical).Areas
         .Replace True, Ary(i), xlWhole, , False, , False, False
      End With
      For Each Rng In Ar
         Rng.Resize(, 2).Copy Cells(Rows.Count, j).End(xlUp).Offset(1)
      Next Rng
      j = j + 3
   Next i
End Sub
 
Upvote 0
Difficult to tell as it's an unspecified error.
Was the sheet with the list, the active sheet when you ran the code?
Also is that sheet protected?
 
Upvote 0
You cannot upload files to the site, but you can upload to a share site such as OneDrive, GoogleDrive, etc & post a link to this thread.
However you have only answered one of my questions.
 
Upvote 0
Open the VB editor, put the cursor anywhere in the code & press F8, this ill allow you to step through the code line by line.
What happens?
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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