Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Create a new worksheet (excel 2003) if one or more cells in a range is not empty

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Create a new worksheet (excel 2003) if one or more cells in arange is not empty

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Create a new worksheet (excel 2003) if one or more cells in a range is not empty

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Create a new worksheet (excel 2003) if one or more cells in a rang

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

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Create a new worksheet (excel 2003) if one or more cells in a rang

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


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
HOW CAN CREATE THE PRICE RANGE IN EXCEL 2003? TEJAS SHAH Excel Worksheet Functions 3 June 11th 09 01:19 PM
Excel 2003 attachments open and show only empty cells when openedvia Outlook 2003? Rob Gordon Excel Discussion (Misc queries) 1 December 2nd 08 09:34 PM
Excel 2003 - Create Copy of Worksheet not working [email protected] Excel Discussion (Misc queries) 0 October 31st 08 07:15 PM
Create an identical Chart Worksheet in Excel 2003 Brooks Charts and Charting in Excel 1 December 7th 07 11:57 AM
Sort Worksheet Range from another worksheet range, Excel 2000 & 2003 jfcby[_2_] Excel Programming 1 August 21st 07 02:55 AM


All times are GMT +1. The time now is 02:05 AM.

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

About Us

"It's about Microsoft Excel"