Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to create a new "tab, worksheet or whatever you call it " (in excel
2003) if one or more cells in a range contain a value. The code starts after i hit a "button". And name the sheet after the value of the cell left of the first cell of that range. I have no clue in how to program this. Can someone provide me the code for this.... Thanks for your help Luc |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 20, 2:17*pm, "Luc Ferrari" wrote:
I want to create a new "tab, worksheet or whatever you call it " (in excel 2003) if one or more cells in a range contain a value. The code starts after i hit a "button". And name the sheet after the value of the cell left of the first cell of that range. I have no clue in how to program this. Can someone provide me the code for this.... Thanks for your help Luc a finite range? ie: cells A1:A20 or an infinite range? if finite: sub A() dim i for i=1 to 20 if thisworkbook.activeshees.cells(i,1)<"" then thisworkbook.sheets.add.name= thisworkbook.sheets.cells(i, 1).value 'or thisworkbook.sheets.cells(i,1).text end if next i this should work. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Luc,
"if one or more cells in a range contain a value." What is this range and what worksheet is it on? or is it simply a user selected range? -- Regards, OssieMac "Luc Ferrari" wrote: I want to create a new "tab, worksheet or whatever you call it " (in excel 2003) if one or more cells in a range contain a value. The code starts after i hit a "button". And name the sheet after the value of the cell left of the first cell of that range. I have no clue in how to program this. Can someone provide me the code for this.... Thanks for your help Luc . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Luc,
"if one or more cells in a range contain a value." What is this range and what worksheet is it on? or is it simply a user selected range? -- Regards, OssieMac The range is part of a row , example : B5:V5 The range is always on the same sheet Regards, Luc |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if finite:
sub A() dim i for i=1 to 20 if thisworkbook.activeshees.cells(i,1)<"" then thisworkbook.sheets.add.name= thisworkbook.sheets.cells(i, 1).value 'or thisworkbook.sheets.cells(i,1).text end if next i Thanks for the reply ! Does this create a worksheet for every cell in the range that contains a value ? (example : 5 cells have a value = 5 sheets added) I would achieve the following : Example : if 8 cells in the range contain a value, then only 1 sheet should be added (never more than 1 sheet should be added) Thanxxxx Luc |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your help :=)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW CAN CREATE THE PRICE RANGE IN EXCEL 2003? | Excel Worksheet Functions | |||
Excel 2003 attachments open and show only empty cells when openedvia Outlook 2003? | Excel Discussion (Misc queries) | |||
Excel 2003 - Create Copy of Worksheet not working | Excel Discussion (Misc queries) | |||
Create an identical Chart Worksheet in Excel 2003 | Charts and Charting in Excel | |||
Sort Worksheet Range from another worksheet range, Excel 2000 & 2003 | Excel Programming |