A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

CELL CONTENTS WRITE TO TAB NAME



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 10:47 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default CELL CONTENTS WRITE TO TAB NAME

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.


Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1:A10")) Is Nothing Then
If Target.Count = 1 Then
On Error Resume Next
ThisWorkbook.Sheets(Target.Row + 1).Name = Target.Text
End If
End If
Application.EnableEvents = True
End Sub

--
Jacob (MVP - Excel)


"Pam M" wrote:

I know there is a way to reference a worksheet name in a cell. Is there an
automated way to name the sheet based on a cells contents? I have summary
sheet with 200 names on it. Each name should have a corresponding worksheet.
So, I want cell A1 with name1 to automatically name sheet2 as name1, and so
on. That way, we have to update only the summary sheet and the worksheets
will always co-incide.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.