![]() |
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. |
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. |
All times are GMT +1. The time now is 03:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com