Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default I need your help in "for" function.

I have this macro does find all available worksheets, and copies the
used range, and paste into newly created worksheet.
It works fine, but I need a couple of modifications. I will appreciate
your time to read this.

1. I have multiple worksheets named,
1,2,3,4,5,6,1a,2a,3a,4a,5a,.....
Now the macro reads everything, but I need the macro to read every
numbered worksheets (i.e. 1,2,3,4,5,6), and stop when it hits 1a.
I don't need any data from 1a,2a,3a,.....on new worksheet.


2. When new worksheet is generated, a default name is given to this new
worksheet (i.e. sheetX) other than this, I need to assign a name like
"report"

Thank you for taking your time to read this.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default I need your help in "for" function.


"Steven" wrote in message
oups.com...

1. I have multiple worksheets named,
1,2,3,4,5,6,1a,2a,3a,4a,5a,.....
Now the macro reads everything, but I need the macro to read every
numbered worksheets (i.e. 1,2,3,4,5,6), and stop when it hits 1a.
I don't need any data from 1a,2a,3a,.....on new worksheet.


When you loop through the worksheets, add an IsNumeric test to the loop

For Each sh In Activeworkbool.Worksheets
If Isnumeric(sh.Name) Then
...

2. When new worksheet is generated, a default name is given to this new
worksheet (i.e. sheetX) other than this, I need to assign a name like
"report"


Worksheets.Add.Name = "report"


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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Excel 2003: Conditional Formatting using "MIN" & "MAX" function MMangen Excel Discussion (Misc queries) 2 September 16th 08 07:13 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
function to return day in the form "Monday", "Tuesday" etc given . MTro Excel Worksheet Functions 2 October 3rd 07 09:49 AM
inserting a conditional "go to" command on a excel "if" function velasques Excel Worksheet Functions 5 March 10th 06 08:16 PM


All times are GMT +1. The time now is 03:25 PM.

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"