Dear Friends,
>
> I am a beginner in Excel Macros...!
>
> I have worksheet with so many names in "column B" of the attached Excel.
> Actually I want to create separate sheets for all the names available in
> "Column B"
>
> *=>* Now I am able to check only the last sheet; and able to add new
> sheet, if the criteria is met only for the last sheet.
>
> *?=>* But I want to check *"sheet1" to "ActiveWorkbook.Worksheets.Count"*and 
> if at all the particualr sheetname is not available in the workbook; I
> need to add a new sheet.
> Else i need to select that particular sheet and move the details from
> "data" to that.
>

Please find the below below codes which i 've used to check the last sheet.

>
>  Sub test()  Count1 = Sheets("data").Cells(Rows.Count, "A").End(xlUp).Row
> ActiveWorkbook.Sheets.Select
>  If Not Sheets(Sheets.Count).Name = "Lara" Then  
> Worksheets.Add(After:=Worksheets(Sheets.Count)).Name
> = "Lara"  Worksheets("data").Cells(1, "A").EntireRow.Copy  
> Worksheets("Lara").Cells(1,
> "A").Select  Worksheets("Lara").Paste  End If  If
> Sheets(Sheets.Count).Name = "Lara" Then  For n = 2 To Count1
> Worksheets("Data").Select              If Cells(n, "B").Value = "Lara"
> Then                  Worksheets("data").Cells(n, "A").EntireRow.Copy
> lr = Sheets("Lara").Cells(Rows.Count, "A").End(xlUp).Row + 1
> Worksheets("Lara").Select                              
> Worksheets("Lara").Cells(lr,
> "A").Select                                  Worksheets("Lara").Paste
> Worksheets("data").Select                          Worksheets("data").Cells(n,
> "A").EntireRow.Delete                      n = n - 1                  Count1
> = Count1 - 1              End If          Next n      n = n + 1
>  End If
>
>  End Sub
> Kindly help me to sort out this issue....
>
>
Thanks&Regards,

Sreekanth M
Mobile:9916941744

-- 
----------------------------------------------------------------------------------
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

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to