View Single Post
  #2   Report Post  
Paul Sheppard
 
Posts: n/a
Default


TJ Wrote:
I create many worksheets for accounts that have the same format. I name
the
worksheets by the account number that corresponds to the worksheet.
How can
I automate the naming of the worksheet tabs? I am unable to put any
type of
formula in the worksheet tab that would reference the account numbers.


TJ

The following Macro will rename the sheet tabs to whatever is in cell
A1, just adjust it to the cell where your Account Number is and it will
rename the tabs to be the same as the account number

Sub update_all_names()
For Each sh In ActiveWorkbook.Sheets
sh.Activate
sh.Name = Cells(1, 1).Value <---(Cells (1,1) = A1, change as required
Next sh
End Sub


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=392169