Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Rename multiple worksheets in Excel

  • 03-04-2009 12:41pm
    #1
    Registered Users, Registered Users 2 Posts: 33


    Help, I'm stuck

    If I have a list in Excel, how do I create multiple worksheets, with each sheet coresponding to one entry in the list? For example I have a list of numbers say, 15523, 16798, 16982... and I want worksheets called 15523, 16798, 16892...

    I hope that makes sense:rolleyes:


Comments

  • Closed Accounts Posts: 704 ✭✭✭Lobelia Overhill


    No it didn't :P

    AFAIK you have to rename each worksheet yourself ...


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    I'd say the only way you could do it is via a VBA script.


  • Closed Accounts Posts: 5,096 ✭✭✭--amadeus--


    Write a vba macro.

    Sub rename()
    'selects the sheet that has your list in it
    Sheets("home").Select

    Range("a1").Select
    'selects the first cell of your list

    Do Until ActiveCell.Value = ""
    'loops until it finds an empty cell

    varname = ActiveCell.Value
    varaddy = ActiveCell.Address
    'variables for teh name of teh new sheet and teh return address of the list

    Sheets.Add
    'adds teh new sheet
    ActiveSheet.Name = varname
    'renames it
    Sheets("home").Select
    'back to main sheet

    Range(varaddy).Select
    'back to correct location in list

    ActiveCell.Offset(1, 0).Select
    'moves to next entry

    Loop
    'loops!

    End Sub


    It's rough but it works! Change the "home" sheet name to teh sheet name that has your list in it and teh A1 reference to teh first cell in your list and when you run it it'll be grand.


  • Registered Users, Registered Users 2 Posts: 33 Donnchadh


    That's great, exactly what I needed. Thanks
    ;)


Advertisement