• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

order tab with text and numbers

Not open for further replies.

Please can you provide me with the macro to solve this.

I have checked so many sites and they all give the wrong out -since I have text and numbers and it does not sort as needed

I have attached a printcreen of the order I have, and the numbers are sorted as needed - they need to be numberical after the text.

i need a macro that will look at the whole number and sort it.




Marc L

Excel Ninja
Hi, according to your attachment a VBA demonstration as a beginner starter :​
Sub Demo1()
    Dim L&, N&, P&, S&
        L = 2
    With Worksheets
  While L < .Count
        N = Split(.Item(L).Name)(1)
    For P = .Count To L + 1 Step -1
        S = Split(.Item(P).Name)(1)
        If N > S Then .Item(L).Move , .Item(P): Exit For
        L = L - (P = L)
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !
you are super smart
is there a way so that I can hyperlink all the tabs I create to the sheet created tab itself.
i will have a column and each rows will have test 1 test2, test.... and each tab will have the same name.
Sheets.Add.Name = Range("L11").Value - this will have a drop down.
maybe you have a better way :)

Marc L

Excel Ninja
Yes you could add any hyperlink the same way you add it manually, easy with the Macro Recorder …​
Not open for further replies.