Add to list without removing values Q

Blsgw

New Member
Joined
Jul 20, 2011
Messages
18
Hello everyone!

Currently using the code:

Code:
Sub CopySheet()
Dim LR As Long
With Sheets("New Brand Template")
    LR = WorksheetFunction.Max(2, .Range("A" & Rows.Count).End(xlUp).Row + 1)
    Sheets("New Brand Page").Range("C5").Copy Destination:=Sheets("Brands").Range("A" & LR)
    Sheets("Brands").Range("A2:A" & LR).Sort Key1:=Sheets("Brands").Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    .Copy after:=Worksheets(Worksheets.Count)
End With
ActiveSheet.Name = Sheets("New Brand Page").Range("C5").Value
End Sub

What it is doing is copying a sheet named New Brand Template, sending it to the end of my workbook, renaming it with the value in C5 of New Brand Page, then adding the name of the new sheet to a list in 'Brands' starting at A2.

Now all of this works as I want it to, but... its not allowing me to expand the list in A2 of Brands... I want it to add it to the list starting there, but multiple brands will be added, at the moment, it will just delete A2 and put the newest brand in, instead of basically shifting A2 down to A3 and putting the newest in A2.

Now how can I modify my code to allow this, and preferable sort that list in A2:A from A-Z?

Thanks guys in advance
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

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