+ Reply to Thread
Results 1 to 11 of 11

Move data to cell sheets

Hybrid View

schafftner Move data to cell sheets 11-21-2008, 06:30 PM
royUK You want to add a sheet named... 11-21-2008, 06:47 PM
schafftner I need it to look like this. ... 11-21-2008, 06:55 PM
royUK Do you want a sheet for each... 11-21-2008, 07:11 PM
schafftner yes i do, and thank you for... 11-21-2008, 07:14 PM
royUK Please mark the thread solved... 11-21-2008, 07:17 PM
schafftner that is alot closer then I... 11-21-2008, 07:19 PM
royUK Please ask the full question... 11-22-2008, 03:10 AM
royUK Here's an earlier post with a... 11-22-2008, 03:55 AM
schafftner Sorry about that. I get that... 11-22-2008, 01:05 PM
royUK You haven't adjusted the code... 11-24-2008, 05:11 AM
  1. #1
    Registered User
    Join Date
    11-21-2008
    Location
    Toronto Ontario
    Posts
    5
    I need it to look like this. The other names need their own sheet. After I will be placing other data and it needs to add to the same name or create a new sheet with that name. (i.e with verett the macro would check to see if it exits and then make a new sheet.)
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Do you want a sheet for each name

    Option Explicit
    
    Function WksExists(wksName As String) As Boolean
        On Error Resume Next
        WksExists = CBool(Len(Worksheets(wksName).Name) > 0)
    End Function
    
    Sub moveRow()
        Dim aWs    As Worksheet
        Dim rng    As Range
        Dim cl     As Range
        Dim sShtNm As String
    
        Set aWs = Sheets("Sheet1")
        With aWs
            Set rng = .Range(.Cells(1, 1), .Cells(.Rows.Count, 1).End(xlUp))
            For Each cl In rng
                sShtNm = cl.Value
                If Not WksExists(sShtNm) Then
                    Sheets.Add
                    ActiveSheet.Name = sShtNm
                    cl.EntireRow.Copy Sheets(sShtNm).Cells(1, 1)
                End If
            Next cl
        End With
    End Sub
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-21-2008
    Location
    Toronto Ontario
    Posts
    5
    yes i do, and thank you for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1