VBA to Make SHeet Name Equal Cell in Sheet

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,630
Office Version
365
Platform
Windows
I suspect that you don't have enough "Empty" sheets.
 

Some videos you may like

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

The_T

New Member
Joined
Sep 30, 2018
Messages
31
Yes, quite right!

You're breadth of excel-related knowledge never ceases to amaze me.

Thank you.

T
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,630
Office Version
365
Platform
Windows
Glad to help & thanks for the feedback
 

The_T

New Member
Joined
Sep 30, 2018
Messages
31
Fluff!

You still there mate?

This spreadaheet is going down very well at work.

I have a question -

We had a VBA code pulling information from an array through into a Row on a sheet and the data was arranged in alphabetical order. The code was:

Sub Transposing_Column_To_Row()
Dim arrList As Object, a As Variant, i As Long, j As Long
Set arrList = CreateObject("System.Collections.ArrayList")
a = Sheets("1. DRAWING REG").Range("C19:D" & Sheets("1. DRAWING REG").Range("D" & Rows.Count).End(xlUp).Row)
j = Sheets("6. APPLIANCE ORDER").Index
For i = 1 To UBound(a)
If a(i, 1) = "KITCHEN" Then arrList.Add CStr(a(i, 2))
Next
arrList.Sort
For i = 0 To arrList.Count - 1
Sheets(j + i + 1).Name = arrList(i)
Next i
Sheets("6. APPLIANCE ORDER").Range("G8").Resize(1, arrList.Count).Value = arrList.toArray
End Sub

Is there any way of removing the element that puts the data in alphabeitcal order and just keeping it as per what is in the array?

Please let me know ifyou want me to upload the excel file again and detail the query a little more (if you're still about and willing to help me again that is!).

Cheers,

T
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
12,882
Office Version
365, 2010
Platform
Windows, Mobile
Have you tried just removing the
VBA Code:
arrList.Sort
line?
 

Watch MrExcel Video

Forum statistics

Threads
1,102,316
Messages
5,486,112
Members
407,535
Latest member
Jens_14

This Week's Hot Topics

Top