Two lists from one.

boomshaka

New Member
Joined
Jun 28, 2018
Messages
10

<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>
I need help turning one list into two. Can you help?

Original List List 1 List 2
Planned PO 1 Planned PO1Break Even PO2
Break EvenPO 2 Planned PO2Break Even PO3
Break EvenPO 3
Planned PO 4
Planned PO 5
Break EvenPO 6
Break EvenPO 7
Planned PO 8
Planned PO 9
Break EvenPO 10
Break EvenPO 11
Planned PO 12
Planned PO 13
Break EvenPO 14
Break EvenPO 15
Planned PO 16

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

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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,215,530
Messages
6,125,347
Members
449,220
Latest member
Edwin_SVRZ

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