Results 1 to 19 of 19

Macro to create multiple sheet, copy certain values and loop until end of row data

Threaded View

jhoelski Macro to create multiple... 02-16-2012, 08:16 AM
OnErrorGoto0 Re: Macro Help 02-16-2012, 08:20 AM
jhoelski Macro to create multiple... 02-16-2012, 08:29 AM
OnErrorGoto0 Re: Macro to create multiple... 02-16-2012, 08:39 AM
jhoelski Re: Macro to create multiple... 02-16-2012, 08:59 AM
OnErrorGoto0 Re: Macro to create multiple... 02-16-2012, 09:05 AM
jhoelski Re: Macro to create multiple... 02-16-2012, 11:36 AM
jhoelski Re: Macro to create multiple... 02-16-2012, 11:08 AM
OnErrorGoto0 Re: Macro to create multiple... 02-16-2012, 11:27 AM
OnErrorGoto0 Re: Macro to create multiple... 02-16-2012, 11:40 AM
jhoelski Re: Macro to create multiple... 02-16-2012, 11:57 AM
OnErrorGoto0 Re: Macro to create multiple... 02-16-2012, 12:47 PM
jhoelski Re: Macro to create multiple... 02-16-2012, 11:39 PM
jhoelski Re: Macro to create multiple... 02-16-2012, 11:56 PM
OnErrorGoto0 Re: Macro to create multiple... 02-17-2012, 05:19 AM
jhoelski Re: Macro to create multiple... 02-17-2012, 06:57 AM
OnErrorGoto0 Re: Macro to create multiple... 02-17-2012, 07:09 AM
jhoelski Re: Macro to create multiple... 02-17-2012, 07:27 AM
jhoelski Re: Macro to create multiple... 02-17-2012, 07:35 AM
  1. #1
    Registered User
    Join Date
    02-16-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    52

    Thumbs up Macro to create multiple sheet, copy certain values and loop until end of row data

    Hi, guys! I news help on this one. I would like to create a macro to copy sheet, name it based on cells from another sheet. I managed, through research, to execute it through looping. see code below:

    Sub copySheet2()
    Dim rngName As Range
    Dim i As Integer
    Set rngName = ThisWorkbook.Sheets("Sheet1").Range("a1")
    Do Until rngName.Value = ""
    i = ThisWorkbook.Sheets.Count
    Sheets("Sheet2").Copy After:=Sheets(i)
    ThisWorkbook.Sheets(i + 1).Name = rngName.Value
    Set rngName = rngName.Offset(1)
    Loop
    End Sub
    It worked well, however, I also need to link or copy values corresponding to each name before it stops executing e.g. Name, Position from Sheet1. I would appreciate any help. Thanks!
    Last edited by jhoelski; 02-17-2012 at 07:29 AM. Reason: Kudos to Rory!

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