Re: $$Excel-Macros$$ Rename Sheet

2011-07-11 Thread ashish koul
try this

Option Compare Text
Sub test()
Dim i As Long
Dim swa As Boolean


Dim ws As Worksheet

Sheets(1).Select
For i = 2 To Sheets(1).Range("a2").End(xlDown).Row
swa = False
For Each ws In ThisWorkbook.Sheets
If Sheets(1).Range("a" & i).Value = ws.Name Then
swa = True
Exit For
End If

Next ws

If swa = False Then
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Name = Sheets(1).Range("a" & i).Value
Exit For
End If

Next i

End Sub




On Mon, Jul 11, 2011 at 4:21 PM, SAJID MEMON  wrote:

>  Dear experts
>
> I have attached my file, for renaming sheet with adding one sheet (1001)
> only at once click
> when we press once command button only one sheet should be created as name
> 1001
> again when i press second time press that button second sheet should be
> created as name 1002 and so on.
>
> Hope for positive responce and earlier
>
> thanks for previous query reply to Rajan, Mahesh & Daniel.
>
> Yours
>
> Sajid Memon
>  094376 38986.
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com 
http://akoul.posterous.com/
*akoul*.wordpress.com 
My Linkedin Profile 


P Before printing, think about the environment.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


$$Excel-Macros$$ Rename Sheet

2011-07-11 Thread SAJID MEMON

Dear experts
 
I have attached my file, for renaming sheet with adding one sheet (1001) only 
at once click
when we press once command button only one sheet should be created as name 1001
again when i press second time press that button second sheet should be created 
as name 1002 and so on.
 
Hope for positive responce and earlier
 
thanks for previous query reply to Rajan, Mahesh & Daniel.
 
Yours
 
Sajid Memon
 094376 38986.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Rename.xls
Description: MS-Excel spreadsheet


RE: $$Excel-Macros$$ Rename Sheet as datawise How?

2011-07-10 Thread Rajan_Verma
Try this..

 

Private Sub CommandButton1_Click()

Dim rng As Range

Dim cell As Range

Set rng = ActiveSheet.Range("A2:a6")

For Each cell In rng

Sheets.Add.Name = cell.Value

Next

End Sub

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of SAJID MEMON
Sent: Sunday, July 10, 2011 10:23 PM
To: Excel Group
Subject: $$Excel-Macros$$ Rename Sheet as datawise How?

 

Dears 
 
I have enclosed a simple file with my problem plz help me in my project.
 
awaiting your positive responce
 
Sajid Memon

-- 

--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Copy of add.xls
Description: MS-Excel spreadsheet


Re: $$Excel-Macros$$ Rename Sheet as datawise How?

2011-07-10 Thread Mahesh parab
Hi
Try

Sub test()
Dim i As Long
Dim ws As Worksheet
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LR
Set ws = Worksheets.Add(After:=Sheets(Sheets.Count))
ws.Name = Sheets("sheet1").Cells(i, 1)
Next i
End Sub


On Sun, Jul 10, 2011 at 10:23 PM, SAJID MEMON wrote:

>  Dears
>
> I have enclosed a simple file with my problem plz help me in my project.
>
> awaiting your positive responce
>
> Sajid Memon
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


RE: $$Excel-Macros$$ Rename Sheet as datawise How?

2011-07-10 Thread Daniel
Hello,

 

Try :

 

Private Sub CommandButton1_Click()

Dim Tabl(), Sh As Worksheet, Ctr As Integer

ReDim Tabl(0)

Sheets.Add

Ctr = -1

For Each Sh In Worksheets

If IsNumeric(Sh.Name) Then

Ctr = Ctr + 1

ReDim Preserve Tabl(Ctr)

Tabl(Ctr) = CInt(Sh.Name)

End If

Next Sh

If Worksheets.Count = 2 Then

ActiveSheet.Name = [Sheet1!A2]

Else

Var = Application.Max(Tabl())

Var = Application.Match(Var, [Sheet1!A:A], 0) + 1

ActiveSheet.Name = Application.Index([Sheet1!A:A], Var, 1)

End If

End Sub

 

Regards.

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de SAJID MEMON
Envoyé : dimanche 10 juillet 2011 18:53
À : Excel Group
Objet : $$Excel-Macros$$ Rename Sheet as datawise How?

 

Dears 
 
I have enclosed a simple file with my problem plz help me in my project.
 
awaiting your positive responce
 
Sajid Memon

-- 

--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


$$Excel-Macros$$ Rename Sheet as datawise How?

2011-07-10 Thread SAJID MEMON

Dears 
 
I have enclosed a simple file with my problem plz help me in my project.
 
awaiting your positive responce
 
Sajid Memon   

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


add.xls
Description: MS-Excel spreadsheet