Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how to create a new sheet when adding values in column if it not e

What i want to do , is to make excel to create a new sheet, with the name of
the content of the cells in a defined column.

so that when i edit a new cell in that column, excel will create a new sheet
with the name of the sheet being equal to the content i entered in the cell.

that is the main question.

and after that :
- how to check if the sheet is already created with that name ?!

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default how to create a new sheet when adding values in column if it not e

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)
Dim ws As Worksheet, wsActive As Worksheet
On Error Resume Next

If Target.Address = "$A$1" Then
Set ws = Worksheets(CStr(Range("A1")))
If ws Is Nothing Then
Application.EnableEvents = False
Set wsActive = ActiveSheet
Set ws = Sheets.Add(After:=Sheets(Sheets.Count))
ws.Name = CStr(Range("A1"))
wsActive.Activate
Application.EnableEvents = True
End If
End If
End Sub

--
Jacob


"Mahdi" wrote:

What i want to do , is to make excel to create a new sheet, with the name of
the content of the cells in a defined column.

so that when i edit a new cell in that column, excel will create a new sheet
with the name of the sheet being equal to the content i entered in the cell.

that is the main question.

and after that :
- how to check if the sheet is already created with that name ?!

Thanks in advance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding some values on a sheet??? Dugholes New Users to Excel 1 September 3rd 08 03:32 PM
Adding multiple values in one column based on multiple values of the same value (text) in another column [email protected] Excel Discussion (Misc queries) 1 May 16th 07 06:02 PM
Adding numerical values based on multiple values in another column Kazmaniac Excel Worksheet Functions 6 April 4th 07 08:53 PM
using excel how would I create sheet for adding mileage? Coop Setting up and Configuration of Excel 1 January 22nd 06 07:05 PM
create list of unique values from a column with repeated values? Chad Schaben Excel Worksheet Functions 1 July 8th 05 10:25 PM


All times are GMT +1. The time now is 10:03 AM.

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

About Us

"It's about Microsoft Excel"