VBA to Make SHeet Name Equal Cell in Sheet

Fluff

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

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
30,253
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

Well-known Member
Joined
Nov 12, 2010
Messages
11,312
Office Version
365, 2010
Platform
Windows, Mobile
Have you tried just removing the
VBA Code:
arrList.Sort
line?
 

Forum statistics

Threads
1,077,855
Messages
5,336,782
Members
399,102
Latest member
chudson1

Some videos you may like

This Week's Hot Topics

Top