Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Name Some Sheets by Text From Cell

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Name Some Sheets by Text From Cell

    I have 20 sheets in the same workbook. I need to name each one by name found in a certain cell. Thank you
    shalom

  • #2
    Re: Name a Sheet by text from a cell

    Hi,

    Dim i   As Byte

    For i = 1 To Sheets.Count
    Sheets(i).Name = Sheets(i).Range("A1").Value
    Next


    HTH
    Kris

    ExcelFox

    Comment


    • #3
      Re: Name Some Sheets by Text From Cell

      Thank you for your reply, yet it looks to me as part of a code. How I adjust and the complete code if you have please. Thanks.

      shalom

      Comment


      • #4
        Re: Name Some Sheets by Text From Cell

        Why does this need tobe in VBA - 20 could be easier and more easy to maintain by manual input, would take less that a minute

        The order of sheets is what worries me, You might needs a helper column to states the real sheets numbers and the tab amendment in another

        jiuk

        Comment


        • #5
          Re: Name Some Sheets by Text From Cell

          Thank you for your reply. I received the file from abroad and didn't plan it myself. To me it looks like there was database in access and reports which were saved as Excel sheets in one workbook. I received for processing only the sheets. Instead of naming each tab (now 20 but soon many more) manually I thought if there is a way to link the tab name to a the same cell in each sheet automatically.
          Thank you.
          shalom

          Comment


          • #6
            Re: Name Some Sheets by Text From Cell

            Originally posted by adaleh
            Thank you for your reply. I received the file from abroad and didn't plan it myself. To me it looks like there was database in access and reports which were saved as Excel sheets in one workbook. I received for processing only the sheets. Instead of naming each tab (now 20 but soon many more) manually I thought if there is a way to link the tab name to a the same cell in each sheet automatically.
            Thank you.
            shalom
            As far as i know there is no manual way to do this, you will have to use code (VBA) as in the above example.

            Comment


            • #7
              Re: Name Some Sheets by Text From Cell

              Ok so then how can we know the running order of the sheets and what names they should take in turn. Else we could be naming any old sheet with any old name <bwer!>

              jiuk

              Comment


              • #8
                Re: Name Some Sheets by Text From Cell

                The VBA code of Krishnakumar did it! Thank you so much. Here is the final code:
                Code:
                Sub nameit()
                
                
                Dim i   As Byte
                 
                For i = 1 To Sheets.Count
                    Sheets(i).Name = Sheets(i).Range("A1").Value
                Next
                End Sub
                Thank you very much.

                shalom

                Comment

                Trending

                Collapse

                There are no results that meet this criteria.

                Working...
                X